Made getCause call null safe