I spent some time today chasing down two bugs, and ended up fixing both of them using the same solution.

Now that I have the solution, I was hoping to get some clarity behind it.

I'm comparing an attribute from Core Data (Integer 16/NSNumber) with an Integer (ABPropertyID & ABMultiValueIdentifier).

The bug was in this comparison, and oddly enough, only showed itself after I had killed the app (from the background tray), reopened it, and run through the same process that included the comparison. Anyways...

This is what stopped working after a restart:

`if (myNumber.aProperty == [NSNUmber numberWithInt:anInteger]) { /* do stuff here */ }`

And these are the two solutions, which so far, are working perfectly:

`if ([myNumber.aProperty integerValue] == anInteger) {/* do stuff here */ }`

`if ([myNumber.aProperty isEqualToNumber:[NSNumber numberWithInt:anInteger]]) { /* do stuff here */ }`

To me, they all look identical. I'm always either converting the NSNumber to an integerValue, or converting the integer to an NSNumber.

Any ideas?