Possible Duplicate:
is there a difference between (!object) and (object == nil)?
In iOS (Objective C) development, I've frequently seen (and used) the following short hand:
if (someObject)
{
// do something
}
To check that someObject is not nil.
In other words, to mean the same as the following:
if (someObject != nil)
{
// do something
}
Are these two if statements actually the same or is this not safe?