There actually is a comeback to the almighty "I know you are, but what am I?"

"It takes one to know one."


This was demonstrated in the 'lemon tree episode' of the Simpsons.

Bart and co. gather around the Springfield lemon tree to bask in the citrus-y goodness. A few metres away, just over the Springfield/Shelbyville border, some hoodlums gather and the insults fly:

Shelbyville Kid: You're a garbage man.
Bart: I know you are, but what am I?
Shelbyville Kid: A garbage man.
Bart: I know you are, but what am I?
Shelbyville Kid: A garbage man.
Bart: I know you are, but what am I?
Shelbyville Kid: A garbage man.
Bart: Takes one to know one!

*stunned silence*

Nerd: Checkmate!