Again, there is a good article at Cocoa with Love.
With Objective-C/Cocoa, I tend to worry about invalid pointer, especially NULL pointer, than with C++/MFC. It is because it is valid to call a message, or method, of a nil object.
However, it doesn’t mean that you can rely on the result of such calling. What’s important is that the result of such calling is negligible.
However, there will be cases where a pointer to an object contain some wrong value.
Then calling or sending a message of such object can yield crash. Therefore it is good to have a way to check the validity of such pointer.
Click this link and let’s learn how people at Cocoa with Love solved it.
Testing if an arbitrary pointer is a valid pointer.