fixing a command issue
null check