src/precore/util/Iterators.php
public static function tryFind(Iterator $iterator, callable $predicate) : Optional
    {
        return Optional::ofNullable(self::find($iterator, $predicate));
    }
public static function tryFind(Iterator $iterator, callable $predicate) : Optional
    {
        return Optional::ofNullable(self::find($iterator, $predicate));
    }
Returns an Optional containing the first element in iterator that satisfies the given predicate,
if such an element exists. If no such element is found, an empty Optional will be returned from this method.

@param Iterator $iterator
@param callable $predicate
@return Optional