Replaced basestring to six.string_types