As GetColorNonStroke is not a method of the original iTextSharp TextRenderInfo, I assume you are using a version patched according to @ChrisHaas' blog entry Getting color information from iTextSharp’s TextRenderInfo and ITextExtractionStrategy.
The members colorStroke and colorNonStroke of GraphicsState (the values of which are returned by the TextRenderInfo methods GetColorStroke and GetColorNonStroke respectively) are initialized with null.
Thus, as long as there was no explicit command before to set the stroking or non-stroking color, the respective TextRenderInfo method GetColorStroke or GetColorNonStroke will return null.
Therefore, whenever you use renderInfo.GetColorNonStroke(), check it for null before accessing its members. If the color is null, assume the default.
Furthermore, @ChrisHaas' color extension of iTextSharp's parsing capabilities uses different kinds of color objects: GrayColor, BaseColor, and CMYKColor. Depending on your requirements you might want to test the type of color returned to you.
In case of special colors, Chris Haas even writes:
SCN and scn themselves are catchalls for everything else that’s not RGB, CMYK or Grey. Before hitting one of those two you should actually first find a CS operator whose first and only operand is the actual color space to use. There’s a bunch of options for this including DeviceRGB, DeviceCMYK, Pattern, Lab, DeviceN, etc. You can find these in table 74 of the 2008 PDF spec section 8.6.8 (page 171). My code is actually not completely correct and I shouldn’t be pushing CS and cs to the SetStrokingGeneral method but instead should do some further processing. Unfortunately none of the samples PDFs that I had at the time had this set so I couldn’t test for it. Hopefully this helps you out!
null. - George Johnston