Adds check for the type of the expression of the if statement
Merge branch 'compiler'