static <T> Val nullSafeCreate(final T value,
                                  final java.util.function.Function<T, Val> creator) {
        Objects.requireNonNull(creator);
        if (value == null) {
            return ValNull.INSTANCE;
        } else {
            return creator.apply(value);
        }
    }
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