Adding checks for Lower and Upper Triangular Matrices