[FEATURE] Rudimentary equality check for expressions

The check is currently only tested for boolean values; all other values
should work as well, but are not secured with a unit test.