See #42956 for background. Rather than adding direct support for types we could add support for a general purpose mapper function.