Fix nested type serialization

It seems that we are getting nested type serialized as `Text` by default as it wasn't explicitly handled.