main: check node id is not noneid

hrm, I agree with xiangli-cmu's argument.