Add some guards against null pointers (ATLASSIM-7031.)
Tentative solution to https://its.cern.ch/jira/browse/ATLASSIM-7031. Since there seem to some conditions under which truth and extrapol are not allocated but fillEnergy is still called this doesn't seem like a unreasonable check to make before using them.