NPE revised version

Signed-off-by: tianyuli <tli@wpi.edu>