fix an npe

Fix an NPE in the jobs code - @gaurave.