static <T1, T2> Val nullSafeCreate(final T1 value,
                                       final java.util.function.Function<T1, T2> converter,
                                       final java.util.function.Function<T2, Val> creator) {
        if (value == null) {
            return ValNull.INSTANCE;
        } else {
            final T2 value2 = Objects.requireNonNull(converter).apply(value);
            if (value2 == null) {
                return ValNull.INSTANCE;
            } else {
                return Objects.requireNonNull(creator).apply(value2);
            }
        }
    }
Creates a Val in a null safe way, either returning {@link ValNull} or the product
of the {@code creator} function.
stroom-query/stroom-query-language/src/main/java/stroom/query/language/functions/Val.java