County sheriffs and their deputies, when on duty, shall be dressed in a distinctive uniform, as described in section 23-1719, and display a badge of office as described in section 23-1719; Provided, the wearing of such uniform and badge shall be discretionary at the option of the sheriff when he or she or his or her deputies are engaged in special investigations or mental patient assignments; and provided further, that special deputies appointed by the sheriff shall be excluded from the requirements of this section.