Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imp...

...orts.
Thanks for the feedback however I wrote it that way specifically to minimize the work required when we drop support for PY2.