def is_nil_and_zero(data)
data.blank? || data == 0
end
If we pass "" it will return false whereas blank? returns true.
Same is the case when data = false
blank? returns true for nil, false, empty, or a whitespace string.
So it's better to use blank? method to avoid empty string as well.