Simplifies comparison of a boolean expression with a boolean literal true or false.