code: def cast(self, d):
      """
      Cast a single value to :func:`unicode` (:func:`str` in Python 3).
  
      :param d:
          A value to cast.
      :returns:
          :func:`unicode` (:func:`str` in Python 3) or :code:`None`
      """
      if d is None:
          return d
      if isinstance(d, str):
          if self.cast_nulls and d.strip().lower() in self.null_values:
              return None
  
      return str(d)
  
imports: from agate.data_types.base import DataType
label_desc: Use image node_id 2 for calling the Text obj's underlying member method code with example usage: obj.cast(d) and returns: str, d, None