Implement checkTriangleType