Added validation to the marshaller, and fixed the marshaller unit tests after
changing the error format.