Check to make sure the command is valid.