Implement conditional triangle checker