validateType = (m) => {
  if (
    !m
    || !Array.isArray(m)
    || !Array.isArray(m[0])
  ) {
    throw new Error('Invalid matrix format');
  }
}
Checks if matrix has a correct type.

@param {Matrix} m
@throws {Error}