added handling when the condition in the if statement has only a boolean variable