trimmedOrNull function
Converts the input to a string if it's not null and trims it or returns
null
if the result is empty.
Implementation
String? trimmedOrNull(Object? input) {
final a = input?.toString().trim();
final b = a?.isEmpty == true ? null : a;
return b;
}