shouldn't here be smt like if(editorSite !=null) ..instead of this ?