make NPE check useful,the orginal one is Dead code