Corrected multidimensional array type checking