// Takes an NSObject and returns its id as Integer or Long
public Object toNative(Object value, ToNativeContext context) {
if (value == null)
return null;
NSObject valueAsNSObject = (NSObject) value;
ID idToReturn = valueAsNSObject.id();
return idToReturn.toNative();
}