Fixed NPE when dimension is null in cube