Add test to check that nil pointers are valid for data that should not b...

...e unmarshaled.

To prevent future changes that would break this behaviour (this is used in the core)