Check if Result is Err and the error satisfies a predicate.
bool isErrAnd(bool Function(E error) predicate) { if (this is Err<T, E>) { final error = (this as Err<T, E>).error; return predicate(error); } return false; }