Prevent error when deleting unbuilt jobs.

If a job has no previous build it could fail with a null pointer.

JENKINS-25491