[JENKINS-20499] Don't fail horribly with null causes

Alternatively, don't expose the internal `ArrayList` in `getCauses()` so we don't even allow `null` in. Not sure whether that's too compatibility breaking.