sanity check whether dimensions are non-null