Check if command == null and if so throw NPE