SCISOFT NCD: add NPE protection