Added method to check if there is a tie.