(Script-Editor) Fix NullPointerException in Javascript block