fix tautological-pointer-compare warnings

Fixes Werror build failures caused by tautological-pointer-compares when building with a custom clang build on OSX.