org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getField" of null (#1)