Though the ministerial exception to employment discrimination laws is in the nature of an affirmative defense that the defendant must allege and prove, the trial court did not err in allowing the defendant in this case to raise the exception for the first time by a summary judgment motion after the close of discovery. Plaintiff couldn’t show any prejudice because she didn’t request that discovery be reopened or a continuance to conduct that discovery. However, on the merits plaintiff alleged facts creating a triable issue as to whether her job as a part-time teacher and part-time administrator fell within the scope of the ministerial exception. She claimed not to be required to instruct her students on religion and the administrative portion of her job didn’t fit within the exception.