class String

def blank?

A string is blank if it's empty or contains whitespace only
def blank?
  strip.empty?
end