protected Object checkUndefined ( Object val ) { if ( val instanceof String && ( ( String ) val ) . equals ( "undefined" ) ) { return null ; } return val ; }
JSObject will return the String undefined at certain times so we need to make sure we re not getting a value that looks valid but isn t .