Migrate "basestring" type to python 3