Crash with a validation error instead of type error
Merge pull request #845 from kennknowles/no-serialize-if-no-xml

Crash with a validation error instead of type error