Earlier this year, The Huffington Post reported on a survey that revealed how surprisingly common it still is for women to be asked personal, sexist and potentially illegal interview questions.1 It’s bewildering that such archaic thinking and practices still exist in professional America, but it appears that some habits die hard. So how should a woman handle being asked these things, without losing out on professional opportunities?

First, let’s be clear about the kinds of questions interviewers should not ask: Are you married? Do you plan to have children? What are your childcare arrangements? These questions are almost never asked of men, and have nothing to do with your suitability for a position. They merely reveal biases against women, especially mothers or women perceived as “potential mothers.”

Consider employing one of the strategies below to handle the situation professionally but firmly:

Strategy #1 assumes these questions are usually a clumsy attempt to assess attributes like commitment and flexibility. When an interviewer asks about your plans to have children or if you employ a nanny, you can amiably reply “I think you’re asking me about my plans because you want to know how flexible I can be and how committed I am to this position,” then go on to list the assets and accomplishments that demonstrate how dedicated you are. This strategy helps you avoid both confrontation and answering the question, while giving you the opportunity to talk yourself up. 

Strategy #2 employs a more direct tack and is best used in very specific corporate cultures--cutthroat, high-powered environments that value boldness and take-charge attitudes, like Wall Street—where an interviewer may appreciate that kind of spunk. You can simply say that you are not comfortable with the question and point out that it’s not usually the kind of thing asked of men. Then segue into Strategy #1’s assumptions and lead the conversation to where you want it to go—a discussion of your abilities and why you’re the right candidate for the position.

You should consider the way you want to respond after the interview, too. If the company is a large one, it may be easy to contact someone in Human Resources to inform them of the questions you were asked. Tell them how you replied; note your discomfort and your understanding that these questions were inappropriate. Stress how interested you are in the position and that you would like to know how best to proceed. Frame your concerns around how important work culture is to you. Ask if they would consider the questions indicative of the general culture of the company. Their response will reveal a lot about how things run there.

It may be more awkward to make a smaller company aware of the problem—your interviewer may have been your potential future boss, or someone who sits right next to him! If that’s the case, you might want to consider it a sign that this job is not the right fit for you and continue your job search elsewhere.

Be prepared for the possibility that calling out your interviewer, informing HR of inappropriate interview questions or simply being assertive may not always result in the outcome you desire. But look at it this way: Missing out on an opportunity at a place that makes you uncomfortable before you’ve even started working there is no great loss.

1 The Huffington Post, “No Woman Should Be Asked These Questions During A Job Interview,” January 2016