Resolve Xcode warning of comparison between pointer and BOOL