An officially sanctioned "controlled burn" of marijuana is generally a part of any officer's training, for exactly that reason. (Not kidding.)
They need to be able to explain how they can identify the smell if asked in court, even if they've smoked it before.