Fix clang "switch condition has bool value" warning