Use six string_types in isinstance