diff --git a/panels.module b/panels.module
index b7d233a..09e33d9 100644
--- a/panels.module
+++ b/panels.module
@@ -1162,7 +1162,7 @@ function template_preprocess_panels_pane(&$vars) {
 
     // Take any that may have been in the render array we were given and
     // move them up so they appear outside the pane properly.
-    if (is_array($content->content) && isset($content->content['#contextual_links']) && module_exists('contextual')) {
+    if (isset($content->content['#contextual_links']) && module_exists('contextual')) {
       $element = array(
         '#type' => 'contextual_links',
         '#contextual_links' => $content->content['#contextual_links'],
@@ -1195,8 +1195,8 @@ function template_preprocess_panels_pane(&$vars) {
 
   // Add some usable classes based on type/subtype
   ctools_include('cleanstring');
-  $type_class = $content->type ? 'pane-'. ctools_cleanstring($content->type, array('lower case' => TRUE)) : '';
-  $subtype_class = $content->subtype ? 'pane-'. ctools_cleanstring($content->subtype, array('lower case' => TRUE)) : '';
+  $type_class = !empty($content->type) ? 'pane-'. ctools_cleanstring($content->type, array('lower case' => TRUE)) : '';
+  $subtype_class = !empty($content->subtype) ? 'pane-'. ctools_cleanstring($content->subtype, array('lower case' => TRUE)) : '';
 
   // Sometimes type and subtype are the same. Avoid redundant classes.
   $vars['classes_array'][] = $type_class;
