1def IsNullOrEmpty(x): # Returns true if null or empty
2 nullorempty = False
3
4 if not(x): # checks for nulls
5 nullorempty = True
6 if x.isspace(): # checks for blank strings
7 nullorempty = True
8
9 return nullorempty