Added check if the condition of an if-statement is of type boolean.