Hardening/619 escaped output

### Description
This PR is only to sync kz-fermin, to see how we want it.
There is one unit test failing (Metadata_test) and 5-6 functional tests failing too.
The failures are because of Associations.
Also missing is an intelligent handling of compound values.

OK, to merge into feature/619_escaped_output, but for develop there is still work to be done.
Maybe it's better to be more descriptive, e.g.: "ERROR: null value".