Add null checks in onStruckByLightning, possible fix for #392