All duly authorized peace officers, while investigating violations of this division in performance of their official duties, and any person working under their immediate direction, supervision or instruction, are immune from prosecution under this division.