Fixing a possible problem when casting objects to chars in ifs and NSAsserts