12 lines
225 B
Python
12 lines
225 B
Python
class IsBlank:
|
|
|
|
@staticmethod
|
|
def __new__(self, val) -> bool:
|
|
|
|
if val is None:
|
|
return True
|
|
|
|
if isinstance(val, (str, bytes)):
|
|
return len(val.strip()) == 0
|
|
|
|
return False
|