Fix crash if underlyingError parameter is nil.
Merge pull request #369 from InsertWittyName/NilErrorFix

Fix crash if underlyingError parameter is nil.