I think you are confusing NSInteger
with an Objective-C class.
NSInteger
is simply a typedef
d integer:
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
If you want something that holds a number which can be nil
then you probably want NSNumber
.