What are the use cases for doing new String(\"already a string\")?
new String(\"already a string\")
What\'s the whole point of it?
Why do you need to check if it is string?
Just check if it is defined or null, and otherwise defensively convert it to any type you want, either the var bar = new String(foo); or var bar = "" + foo;.
var bar = new String(foo);
var bar = "" + foo;