Add isUpperTriangular method