public Optional<Value> getConstantValue() {
        if (constantValue != null) {
            return Optional.of(constantValue);
        }
        if (constantValueFunction != null) {
            return Optional.of(constantValueFunction.apply(type().orElse(null)));
        }
        return Optional.empty();
    }
Gets the constant value if it exists
model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java