In the coffebreaks we sit around table and just shoot the shit. So ofcourse theres more wiggle room for weird/funny conversations.
But theres a tendency where theres always one who drags. Find out who that person is and have a game face around him. Dont laugh or play into his/hers sarcastic personality. keep it strictly collegial/professional around him/her. I sniffed this specific collegue within 2 seconds, and I never laugh or entertain his jokes, even if they happen to be funny. If you dont react positively, he will imedeatly sense it and back off/respect you.
So in verbatim this is how it went: «Somalia, eh?»
me:

?
Peep how I didnt even smile or acted exciting, I just hit him with the huh?
Now whatever he intented to really say took a turn and he just followed with «Good theres no war here in this country! We all have it great here»
me: «yeah»
Keep it always short and brief with these types, and act happy and be your self with the ones you trust 100% and are proven friends.
In another instance he mentioned how a mayor in UK wanted to impose shariah. We all know its BS and they just wanna legitimate theyr racism. So what did I do ? Never agree, laugh or engange in any of theyr takes. The shariah thing he wanted a reaction but didnt get any, and he ended looking like the stupid unfunny guy at work who talks politcs.
This is how I dealt with this specific situation, but theres other scenario. I hope this helped
This was a boss btw. After that he always respected me
I learned it by trial and error. I got blindsided when I was a greenhorn and acted like my true self from the get go. I was curious, excited, enganged in fun conversations with
the wrong people. You have to read them and figure them out quick, and they always leave signs here and there you can pick up. If you were laughing and being jolly around a racist without knowing, you can risk in the next situation to potentially look like boo-boo the fool. You dont want that to ever happen. Try to keep poltics to an absolute minimum, or even threathen them with the 3 letter department, in our case HSE or HR or even the union.
Funny thing is Ive went that route, I’m single but the other guy I reported have a wife and kids. He was on the brink to lose it all, and you set that type of heavy presedence you will be untouchable