A dog shall not be declared a dangerous or potentially dangerous dog if:

A. the dog was used by a law enforcement official for legitimate law enforcement purposes;

B. the threat, injury or damage was sustained by a person or domestic animal who was:

(1)     trespassing upon premises occupied by the owner or the dog;

(2)     provoking, tormenting, abusing or assaulting the dog or had repeatedly, in the past, provoked, tormented, abused or assaulted the dog; or

(3)     committing or attempting to commit a crime; or

C. the dog was:

(1)     responding to pain or injury;

(2)     protecting itself or its offspring; or

(3)     protecting or defending a human being or domestic animal from attack or assault.