Updating `map` to handle strings too.