Command validation.