We discuss optical chirality in different types of gyrotropic media. Our analysis is based on the formalism of nongeometric symmetries of Maxwell's equations in vacuum generalized to material media with given constituent relations. This approach enables us to directly derive conservation laws related to nongeometric symmetries. For isotropic chiral media, we demonstrate that like a free electromagnetic field, both duality and helicity generators belong to the basis set of nongeometric symmetries that guarantees the conservation of optical chirality. In gyrotropic crystals, which exhibit natural optical activity, the situation is quite different from the case of isotropic media. For light propagating along a certain crystallographic direction, there arises two distinct cases: (1) the duality is broken but the helicity is preserved, or (2) only the duality symmetry survives. We show that the existence of one of these symmetries (duality or helicity) is enough to define optical chirality. In addition, we present examples of low-symmetry media, where optical chirality cannot be defined.