private IncrementalIndex.SortedDimLookup getDimLookup() {
   if (dimLookup == null) {
     final IncrementalIndex.DimDim dimDim = dimensionDesc.getValues();
     if (hasNullValueDimensions.contains(dimensionDesc.getName()) && !dimDim.contains(null)) {
       dimDim.add(null);
     }
     dimLookup = dimDim.sort();
   }
   return dimLookup;
 }
  private boolean hasNullValue(IncrementalIndex.DimDim dimDim, int[] dimIndices) {
    if (dimIndices == null || dimIndices.length == 0) {
      return true;
    }
    for (int dimIndex : dimIndices) {
      Comparable val = dimDim.getValue(dimIndex);

      if (val == null) {
        return true;
      }

      if (val instanceof String) {
        if (((String) val).length() == 0) {
          return true;
        }
      }
    }
    return false;
  }