Add serialization support for parametrized types