The README correctly says
We would prefer to also throw when a non-string argument is provided, but it is much less clear that would be web-compatible.
I'm filing this issue to track this as an explicit open question. I strongly prefer the throw and hope we can get agreement on that.