Cast string versions to int (if read from a file etc)

def version(self, version):
        """ Cast string versions to int (if read from a file etc) """
        if isinstance(version, type_check):
            self._version = int(version)
        elif isinstance(version, int):
            self._version = version