Relying on `__NSCFBoolean` or what the class is called seems to be a bit fragile.

What about something like
```objc
[obj isKindOfClass:NSNumber.class] && strcmp([obj objCType], @encode(BOOL)) == 0
```
?