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

...orts.
Maybe wrapping the inline conditional in parentheses would help readability.