I was recently told by a young professional that when he was trained on crafting his elevator pitch, he was told to start with a joke. A joke can set everyone at ease and create a rapport between you and those with whom you are interviewing. An imprudent joke, on the other hand, can end your chances of getting a job. While most of us know to avoid off-color humor in professional settings, there are other ways you can get in trouble with a joke. Here are three guidelines:

1. Avoid controversial topics. Politics, religion, gender, and appearance are all off limits during an interview, especially in humor. Nothing can be more costly than making assumptions about where other people are coming from and what they might find funny.

2. Avoid jokes at someone else’s expense. Humor should never be unkind. Even if the person isn’t present, it reflects poorly on you if you make someone else the butt of a joke. A cheap shot is not worth your time—or the cost to your reputation.

3. Don’t be afraid to laugh at yourself. You can show that you don’t take yourself too seriously with a gentle joke about yourself. Jokes should not be scathingly self-deprecating, but a good-natured jest about your traits or experience reflects a healthy self-awareness.

Underlying each of these tips is the principle that jokes should never create discomfort. Humor is meant to bring us together. When employed well, jokes create moments of positive connection.