Not all matrices are invertable (e.g. when a transformation matrix is has a scale of zero), and it's sometimes important when a matrix is. This also better specifies the behavior when the matrix is not invertable: the identity matrix is returned. Pull Request: https://projects.blender.org/blender/blender/pulls/120530