isListEmpty<T> function
Checks if a nullable list is null or empty.
Use List? extension isNullOrEmpty for cleaner code.
Example:
isListEmpty(null); // true
isListEmpty([]); // true
isListEmpty([1,2]); // false
Implementation
bool isListEmpty<T>(List<T>? value) => value == null || value.isEmpty;