(a) An owner of a dog or cat commits an offense if the animal is not spayed or neutered.
(b) It is a defense to prosecution under Subsection (a) that:
(1) the animal is under six months of age;
(2) a licensed veterinarian annually certifies that the dog or cat should not be spayed or neutered for health reasons or is permanently non-fertile;
(3) the animal is being held for sale by a retail pet store or held for adoption by animal services or an animal welfare organization;
(4) the animal is certified annually as a competition cat or competition dog;
(5) the person charged produces to the court proof of sterilization from a licensed veterinarian showing the dog or cat was sterilized at the time the citation was issued or not later than 20 days after the citation was issued; or