explicitly cast to bool

This avoid in some situations that `bool(cond)` can be interpreted as function declaration