A person charged with prostitution, sex trafficking or prior similar laws in effect at the time the act occurred, or another nonviolent offense committed as a direct result of being a victim of human trafficking may assert an affirmative defense that the person is a victim of human trafficking.
§ 45-5-710, MCA