Function to test for visible output in a render array

Here is a function to add to a Drupal theme that will return if a renderable array contains content. You can use this with an if statement to only include wrapper markup on content that actualy renders.

Valid XHTML 1.0 Transitional