Oops. Fixed this and changed all files to check for typeof "undefined" instead of not existent.