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

Casting from int to char leads to:

```objc
const BOOL areEqual = (BOOL)(0xFFFFFF00) == (BOOL)(nil));

NSLog(@"%d", areEqual);
```

```
1
```