Detecting planets in planetary nebulae