code: def toString(value):
          
          if isinstance(value, basestring):
              return value
          elif type(value) in [np.string_, np.str_]:
              return str(value)
          elif type(value) == np.unicode_:
              return unicode(value)
          else:
              raise TypeError("Could not convert %s to string type" % type(value))
docs: Convert a value to a string, if possible.