Type checking of if statements implemented