I think he's only joking but at some point Oda is going to come 100% clean with why Nami hurts Luffy. It's been Sanji before as well, Chopper too and maybe Usopp.
It's not just gags either. Garp gave us the slightest hint at what it was. Oda confirmed it wasn't Haki. An entire chapter was partially named after it.
Love.
Post Enies Lobby, Garp made at visit to the crew. He struck Luffy and everyone questioned what happened. Garp explained "There's no defense against a fist of love." The chapter was titled Fist Of Love. Years later post time skip I think, someone asked in the SBS what did Garp strike Luffy with, Haki or Love? Oda simply said Love.
Even the characters in the story seem to look at Luffy getting bruised up by Nami as a gag, they don't question it so neither should we. I'm certain it will be explained sometime way down the line with Vegapunk(most likely) that for what ever reason, a fruit users natural defenses are useless against someone who truly loves them. I can't even fathom the explanation beyond something weird like the Devil Spirit inside is no match for Love, hahaha.
It's one of those things that such an obvious gag but will ultimately manifest it's self into a real plot point.