proverb

Many a true word is spoken in jest.

joke

used to say that

People while they are joking, they might say things that are true and important.