This may be moved in the `if (is_string)` block, and a similar check could be added to `set()`.