Another way to look at this is that making bomb jokes is really rude to the security people. TSA is 99% bullshit but this goes for all airport security the world over.
If you say something like that, they have to take it seriously, even if they know you are joking. They can’t take the chance that you aren’t because the stakes are too high. So what you’re doing is making the day a lot worse for someone who is already working hard at a difficult job. They now have to treat you like a terrorist. You’ve given them no choice.
Whether or not laws about making jokes exist in your area, don’t do this out of basic human courtesy for the airport staff.