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