findOrNull method
Returns the Right.value matching the given predicate,
or null if this is a Left or Right.value does not match.
Implementation
R? findOrNull(bool Function(R value) predicate) => switch (this) {
Left() => null,
Right(value: final value) => predicate(value) ? value : null,
};