Prevent traceback when job is None.

Minions will stack trace on start sometimes if there are unusual things in the job cache directory because the iterator variable was None.  Fixes #9138