In this case, it seems that you have a string with the value "(null)". This can happen if you are trying to add or format the contents of the string that was the most null. This is a valid string that is not NULL or nil and has a length of 8 characters. Thus, it enters your cycle.
In objective-c, NULL and nil are the same thing (number 0). But the style guide will tell you to use NULL for pointers and nil for classes derived from NSObject.
source share