Making isinstance(s, basestring) work for both python2 and python3.