Typescript Check If Object Is Not A Matrix Is Invertible If