public Optional<T> getOptional() {
        Optional<T> v = value.get();
        if (v == null && !value.compareAndSet(null, v = Optional.ofNullable(supplier.get()))) { // NOSONAR
            v = value.get();
        }

        return v != null ? v : Optional.empty(); // NOSONAR
    }
Gets optional value, which may or may not be null.

@return optional value
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseDeferredValue.java