check cmd == null