Light/Shadow catcher?

Is it possible to have a material that only renders when it is touched by light or shadow? Otherwise, I want it to be invisible. Thanks!