Using isBaseBoolean in the type checking of logical expressions