adding a null check to try to prevent an NPE. hopefully resolving [JENKINS-24839]

I ran into the same issue and have attempted to resolve it. The build's tests pass and my instance of Jenkins is once again able to save configuration changes. I have not managed to trace back WHY the job is null, but this at least prevents this plugin from breaking configuration updates in my case. Hope this helps.