Fix compiler warning about implicit conversion to bool