checking saved commands for undefined