[BUGFIX] Cast to boolean before type-strict comparison

Fixes: #502