isEmptyPayload static method
Returns true if value is null, an empty string, an empty map, or
an empty list/iterable.
Implementation
static bool isEmptyPayload(dynamic value) {
if (value == null) return true;
if (value is String) return value.trim().isEmpty;
if (value is Map) return value.isEmpty;
if (value is Iterable) return value.isEmpty;
return false;
}