def no_nonsense(value):
 value = str(value).strip()
 if (value.lower() == 'none'):
  value = ''
 return (None, value)

def no_nonsense ( value ) : value = str ( value ) . strip ( ) if ( value . lower ( ) == 'none' ) : value = '' return ( None , value )
strip and filter out none and none from strings .