Avoid continuous api call when jobName is undefined

Fix multiple 404 errors when JobDetailCtrl controller is called when going back to homepage, but jobName is undefined.