It's a single location that's responsible for making a value "safe" for js, rather than scattering it thoughout the code base. It also means if there's a bug, it's with that method rather than this PR.