vulnerability bugs version 6

The PR fixes a number of bugs outlined in the GEM Vulnerability Database & GUI Google doc.
I don't want to check for the string 'undefined', instead I want to check for a variable that is not defined, please see:
"When you check for a == "undefined" You are seeing if a is equal to the String value "undefined". undefined without quotes in Javascript is an undefined value" http://stackoverflow.com/questions/7185096/what-is-the-best-js-practice-to-check-undefined-variable