code: def is_type_text_string(obj):
      
      if PY2:
          # Python 2
          return type(obj) in [str, unicode]
      else:
          # Python 3
          return type(obj) in [str, bytes]
docs: Return True if `obj` is type text string, False if it is anything else,
      like an instance of a class that extends the basestring class.