Booleans comapred strictly

Fixes #71 insight suggestions
valid() method return value type is bool. This change isn't correct.