basestring normailization for python3.