For me: pull over, side stand down, engine off, remove helmet and gloves, then wait for the officer. Showing some grey hair seems to help. Having a license plate that reads GRAMMPA apparently helps as well. Nothing but warnings ever since I got that plate - I've been stopped on three different bikes that I've had that plate on.
But, learning how to not get pulled over in the first place seems to make the biggest difference. Go fast in the corners, not so much on the straights.
Now, where's that old-guy smiley?