isEmptyString function
Returns true if s is empty or null.
trim if true will trim s before check for String.isEmpty.
Implementation
bool isEmptyString(String? s, {bool trim = false}) {
if (s == null) return true;
if (trim) {
s = s.trim();
}
return s.isEmpty;
}