validate2D = (m) => {
  validateType(m);
  const aShape = shape(m);
  if (aShape.length !== 2) {
    throw new Error('Matrix is not of 2D shape');
  }
}
Checks if matrix is two dimensional.

@param {Matrix} m
@throws {Error}