You can thank Nana Smith for filtering out the naughty words from Will Smith’s rap songs.

Smith appeared on Tuesday’s episode of “Late Night with Seth Meyers”. During the chat, Meyers asked Smith why he almost never swears when rapping.

RELATED: Will Smith Surprises Receptionist He Met 30 Years Ago

“I was 12 years old and I started rapping,” he reflected. “So, I had my rap book, and I was writing my stuff and I had all my little curse words in my rap book. And my grandmother found my rap book.

“She never said nothing,” he added. “Turned to the back page and she said, ‘Dear Willard, truly intelligent people do not have to use words like this to express themselves. Please show the world that you’re as smart as we think you are. Love, Gigi.’ I read that, and I was like, ‘F**k.'”

RELATED: Will Smith ‘Wasn’t Happy’ With His Last ‘Men In Black’ Sequel

Smith’s appearance on “Late Night” was in conjunction with the impending release of “Bad Boys for Life”. It is the sequel to 2003’s “Bad Boys 2” and reunites Smith with Martin Lawrence. The film also stars Vanessa Hudgens, DJ Khaled, and Canada’s Alexander Ludwig.

“Bad Boys for Life” premieres January 17.