Fixed NPE when dimension is null in cube
Fixed NPE when y optional grouping is not defined correctly