Updating `set-index!` to handle strings too.