[JENKINS-11078] prevent NPE

Won't fix JENKINS-11078 root cause, but prevent the build to fail with a NPE