Allow for err.stack to be undefined without exploding