A defense based upon any of the provisions of this article is an affirmative defense.