The problem is that in C 'if' can be used with any type.
IMHO, you should have a naming convention (explicit, or more subtle) so that you
know the types, because the problem isn't limited to the if clause and comparisons.
Once you fix that, you get rid of needing the comparisons to other values just to demonstrate the type!
if(isDog) // any isSomething is bool
printf("%d", numDogs); // num anything is
intor explicitly,
if(b_dog_exists)
printf("%d", i32_n_dogs);
whatever your coding style or naming convention is, I don't think writing excess comparisons just to "demonstrate" the type is a good solution. This information should be available in some other way.