Your father-in-law is probably right. Cavitation is a collapse of steam into water. When water turns to steam and expands, then the bubble collapses when it hits cool water, the sound is like pinging. Pump cavitation happens when the pump pulls a lower pressure and the hot water boils at the lowered pressure. Your water heater pings as water turns to steam in a hot pocket of dirt, then the steam collapses when it gets out and collapses in the cooler sorrounding water. This is an indication that there is a dirt pocket inside the heater. If you can not flush the dirt from the bottom or wherever it is so the pinging stops, don't expect things to get better; it might be time then for a new heater before it burns up from the scaling on the heat exchanger.