[fix] basestring doesn't exist in python3