Further sanity checking for the matrix.