b = isLinear M
Note that a linear matrix, in this sense, can still have different target degrees (in which case the cokernel decomposes into a direct sum by generator degree.)
The object isLinear is a method function.