Clam61, what would be the value of such a check? When you pass "nil" to the method, it crashes anyway, right?
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
So the check is done by the NSArray method already; all that I could do is throw another error. (Or do you mean I should ignore the nil value?)
iosNighthawk, indeed, I hated to have to add that check there, as well. It was the only way to assure that the root object is created only after I know the width and height of the view controller. (If you ask me, a bug in the SDK.) 😐
However, in reality, it's not a performance problem at all. It's only one if-statement per frame, after all.