public static DimensionBinding createFrom(List<String> dimensions, DimensionValues dimensionValues) {
        if (dimensionValues == null || dimensionValues == DimensionValues.empty) return nullBinding;

        // If null, preserve raw material for creating a context later (in createFor)
        if (dimensions == null) return new DimensionBinding(null, dimensionValues, null);

        return new DimensionBinding(dimensions, dimensionValues, null);
    }
Creates a binding from a variant and a context. Any of the arguments may be null.
container-search/src/main/java/com/yahoo/search/query/profile/DimensionBinding.java