Support for writing the polymorphic type key.