Any dog being used by a law enforcement officer to assist in official duties shall be exempt from the provisions of this article even if it inflicts injury if the person injured: (1) Was committing a willful trespass or tort; (2) Was tormenting, abusing, or assaulting the dog; (3) Had tormented, abused, or assaulted the dog; (4) Was committing or attempting to commit a crime.