Added function to check for type of triangle