First and foremost, look for a farm or brand that puts an importance on testing for mold and the use of pesticides. If you’re in a legal state/country, this will probably be done for you, - one of the benefits of a regulated market.
Drying should be slow and controlled to prevent mold and preserve the terpenes and cannabinoids that give cannabis its aroma and flavor. Curing involves storing the dried cannabis in a controlled environment to allow for further degradation of chlorophyll and other unwanted compounds.
If you’re not in a regulated market, know that sometimes growers speed up the drying process for sooner financial gain, which can cause mold. We definitely do not want to smoke mold. Be sure you trust your source, and hire politicians fighting for legalization where you live.
Testing not only ensures there’s no junk being added to our cannabis, it also ensures we have access to accurate THC content, as false-advertising abounds.