In some rare cases DeploymentExceptionHandler can pass null value to transformers, which isn't really useful.
This can happen when the exception is DeploymentException which has no cause (or has itself set as cause). E.g. this code can yield null.
I came across this in combination with wildfly-arquillian and certain Arq. interceptor ordering (so that this exception handler was called first and the exception wasn't wrapped yet).