Now checks if the command is valid