If Cooper & company called in a tip and reported marijuana being grown, then it would appear to be "filing a false police report" which is an offense.
It would NOT excuse the cops for raiding a home based on an anonymous tip.
Now, if Cooper & company called in and anonymously reported "grow lights and plants" being set up, without reporting an actual crime . . . they have a defense.
I don't see this as any worse than cops selling weed and then busting the people they sold it to . . . yet they aren't arrested for selling the dope. Generally speaking, "commit a crime to catch a criminal" just doesn't fly in my book.