whereOrNull method
Returns the filtered elements of the list if it is success or null
Implementation
Iterable<T>? whereOrNull(bool Function(T) predicate) => match(
onSuccess: (list) => list.where(predicate),
onError: (e) => null,
);