code: def nullify(v):
      
  
      if isinstance(v, six.string_types):
          v = v.strip()
  
      if v is None or v == '':
          return None
      else:
          return v
docs: Convert empty strings and strings with only spaces to None values.