If a value is present and matches the given predicate, returns an optional containing the value, otherwise returns an empty optional.
an optional containing the value if a value is present, otherwise an empty optional