Hide complex types after applying role leaves it empty

This only applies if field or model has `serialize_when_none` set to False.

In my case, after applying a role the submodel was left empty, and since I use the `serialize_when_none = False` option, didn't want an empty dict as value in the resulting JSON key.