Check if numFmt isn't nil

This fixes the following error: "undefined method `each' for
nil:NilClass"