Do getValue() of Boolean objects before comparing them

Closes #268.