Returns true if string is either null or entirely whitespace.
bool nullOrWhitespace(String? source) => source?.trim().isEmpty ?? true;