def empty_str(in_str):
 if ((in_str is not None) and (not isinstance(in_str, string_types))):
  raise TypeError('Arg must be None or a string type')
 return ((in_str is None) or (len(in_str.strip()) == 0))

def empty_str ( in_str ) : if ( ( in_str is not None ) and ( not isinstance ( in_str , string_types ) ) ) : raise TypeError ( 'Arg must be None or a string type' ) return ( ( in_str is None ) or ( len ( in_str . strip ( ) ) == 0 ) )
simple helper to return true if the passed string reference is none or or all whitespace .