@Nonnull
    public<U> NullableOptional<U> map(@Nonnull Function<? super T, ? extends U> mapper) {
        Objects.requireNonNull(mapper);
        if (!isPresent())
            return empty();
        else {
            return NullableOptional.of(mapper.apply(this.value));
        }
    }
If a value is present, apply the provided mapping function to it,
and return an {@code NullableOptional} describing the
result. Otherwise return an empty {@code NullableOptional}.

@param <U> The type of the result of the mapping function
@param mapper a mapping function to apply to the value, if present
@return an {@code NullableOptional} describing the result of applying a mapping
function to the value of this {@code NullableOptional}, if a value is present,
otherwise an empty {@code NullableOptional}
@throws NullPointerException if the mapping function is null
helper/src/main/java/me/lucko/helper/utils/NullableOptional.java