I'm not the most serious guy. Even at work I do joke about things. In sales, I've found it's even good to break the ice and make people comfortable opening with a joke. Or broke the tension in a meeting that didn't go that well. And of course as a dad I'm obligated never to miss an opportunity to throw a quality pun.
But as a leader it's not not that simple. It's not just that leaders are expected to be serious, stay in the matter with facts. People expect leaders to tell the truth, or at least some truths behind the words. You can never be sure are they really joking. And you instinctively try to please them, make them think the best of you.
I once had a boss that jokingly said to their assistant to make sure to book their seat from the business class when most of the company was going to a conference. He was joking, but the assistant couldn't be sure, so they booked the business class ticket.
As an expert leader, joking about subject matters in a wrong place can be even more dangerous. Your words are taken seriously even if you didn't mean them and soon you might find the developers seriously considering some obscure technology thinking you have a vision and insight beyond their understanding.