Added isTriangular() method.