Checking the size of matrices is now more modular.