I know it's not really part of these changes, but should this be checking for more general `Mapping` instead of `dict`?