Delegate `type_cast_for_write` to injected type object
Merge pull request #15208 from sgrif/sg-delegate-type-cast-for-write

Delegate `type_cast_for_write` to injected type object