Be sure your job announcements list minimum qualifications applicants must have. That way, if someone who lacks the right background sues, the case can quickly be dismissed.
Of course, for this to work, everyone considered for an interview must meet those qualifications.
Recent case: John, who is black, sued a school district when his application to become a principal wasn’t considered. The district argued that John simply wasn’t qualified because he didn’t meet the minimum requirements for the job; he didn’t have a K-12 teaching certificate. Other candidates did and the requirement wasn’t negotiable. That got the case tossed out. (Saulsberry v. Minneapolis Public Schools, No. A14-1197, Court of Appeals of Minnesota, 2015)
Final note: Applicants often sue when they aren’t called for an interview for jobs they think they are qualified for. Accept that reality and prepare.