Actually, that's just one theory, and not necessarily the correct one. There is another school of thought that clownfish have a copious slime coat and this slime coat either mimics the anemone's own slime, or in some other way inhibits the firing of the anemone's nematocysts.
If you've watched a clownfish newly introduced to an anemone, they often dart in and out of the anemone, as if they are getting stung. However, with a clown that is hosted by an anemone, the clown swims amongst the anemone's tentacles, and there is no indication that the anemone's nematocysts are firing (as there would be if the clown was just immune to the nematocysts - they'd still be firing).
FWIW,
Kevin