fixed with `elif not isinstance(version, basestring):`