That might work until there's somebody who uses double negation !! for some reason. But this might only be common in JavaScript, so YMMV.
Apparently it's a way to negate and convert to boolean.
(eta: didn't finish the thought - I'd assume SQL influenced Excel, since it's older.)
This is a much more readable cast.
The problem is that many developers are unaware that `const s = new String(x);` creates a string Object. It looks like a string, and acts like a string, except that in some places it is not a string: for example `typeof s` returns “object”! Same problem for Boolean, Number, etcetera. Yes casts are ok, but it is easier to just say never use the value object keywords because you can end up with very wierd bugs a long way from where the value object was created.
Another example:
let x = new Boolean(true);
console.log(x === true);
Gives false.