added isNaN method to MatrixUtils