[JENKINS-24773] Avoid NPE