@Nonnull
    public NullableOptional<T> filter(@Nonnull Predicate<? super T> predicate) {
        Objects.requireNonNull(predicate);
        if (!isPresent()) {
            return this;
        } else {
            return predicate.test(this.value) ? this : empty();
        }
    }
If a value is present, and the value matches the given predicate,
return an {@code NullableOptional} describing the value, otherwise return an
empty {@code NullableOptional}.

@param predicate a predicate to apply to the value, if present
@return an {@code NullableOptional} describing the value of this {@code NullableOptional}
if a value is present and the value matches the given predicate,
otherwise an empty {@code NullableOptional}
@throws NullPointerException if the predicate is null
helper/src/main/java/me/lucko/helper/utils/NullableOptional.java