Get Renderer Component (regardless of Type)

I have created a simple Pool system which, when returning an object to the pool, attempts to:

gameObject.active = false;
gameObject.renderer.enabled = false;

The problem I’m having is that I use a variety of prefabs, some of which contain MeshRenderers, and some of which contain SkinnedMeshRenderers attached to children.

I’m after a kind of ‘catch all’ way of disabling the renderer. At the moment the best I can come up with is:

GameObject go = gameObject.GetComponentInChildren();
if (go == null) go = gameObject.GetComponentInChildren();
if (go == null) go = gameObject.GetComponentInChildren();
…etc…
go.enabled = false;

And then I’m not sure that it’s catching the renderer when it’s attached to the parent GameObject.

Is there some simple way of saying “Don’t render this gameObject or any of its components”?

typeof

var r:Renderer = GetComponent (typeof (Renderer));
Renderer r = GetComponent (typeof (Renderer));

You know, I was certain I had tried doing this already, but specifying “Renderer” as the type didn’t return any “SkinnedMeshRenderer” or “MeshRenderer”. Obviously, I was wrong, because it works perfectly. Thanks!