Fix #5197. Add check for non-existing jobAd

Fixes #5197