If(var == undefined) {}

Is it possible to do a statement such as if(string == undefined) { }?

I’m pulling the strings from XML. I’m just trying to not have to go through and put x=" " for each empty childNodes in the XML where this variable isn’t necessary.

Thanks
Igby