public Optional<T> asOptional() {
        if (value == null) return Optional.empty();
        return Optional.of(value);
    }
Creates a new settable optional with the given value, or an empty
vespajlib/src/main/java/com/yahoo/lang/SettableOptional.java