public static OptionalDouble ofNullable(Double d) {
        if (d == null) {
            return OptionalDouble.empty();
        } else {
            return OptionalDouble.of(d);
        }
    }
Wraps the specified nullable value in an {@code OptionalDouble}.

@param d  the value
@return   the wrapped optional
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/util/OptionalUtil.java