It is a defense under this part that:
(1) the actor was acting under a reasonable belief that:
- (a) the conduct was necessary to protect any person from imminent bodily injury or death; or
- (b) the detention or restraint was authorized by law; or
- (2) the alleged victim is younger than 18 years of age or is mentally incompetent, and the actor was acting under a reasonable belief that the custodian, guardian, legal guardian, custodial parent, or person acting in loco parentis to the victim would, if present, have consented to the actor's conduct.