Fixed NoneType not iterable issue

I encountered an error while using this tool. I submitted issue #188 (which I will now retract) related to this, and then attempted to fix it.

With this patch, the program runs and converts my upv file without error!