[warnings][caffe2] Fix -Wstring-conversion warnings (#71874)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71874
Treating a string as a boolean is a clang warning (`-Wstring-conversion`). Clang, however, makes an exception for cases where you `&&` the string, specifically for assertion use cases.
e.g.
```
assert(false && "should never happen!");
```
There a number of checks/asserts that never actually trigger because they were checking against a string, which is always non-zero (and evaluates to true). This will fix all those impotent asserts/checks.
Test Plan: CI Pass
Differential Revision: D33796853
fbshipit-source-id: a895e047173bbea243fba76705e5b1aa5c5db064
(cherry picked from commit 0decb563d10e312f7f6730f740da006ed04fad37)