code quality for cmdAddItem.h and assert sth

code quality for cmdAddItem.h and assert sth