diff --git a/betterselect.module b/betterselect.module
index 954387b..0f5344e 100644
--- a/betterselect.module
+++ b/betterselect.module
@@ -90,7 +90,7 @@ function betterselect_process($element, $edit, $form_state, $complete_form) {
       $options = array();
       $defaults = array();
       foreach ($element['#options'] as $option) {
-        if (is_array($option->option)) {
+        if (is_object($option) && is_array($option->option)) {
           foreach ($option->option as $tid => $name) {
             $options[$tid] = check_plain($name);
           }
@@ -132,7 +132,7 @@ function betterselect_process($element, $edit, $form_state, $complete_form) {
     $element = expand_checkboxes($element);
 
     // Hide the silly "None" option. (assumes array element with a blank key is the "None" option)
-    if (!$element['#required'] && is_array($element[''])) {
+    if (!$element['#required'] && isset($element['']) && is_array($element[''])) {
       $element['']['#prefix'] = '<div style="display:none">';
       $element['']['#suffix'] = '</div>';
     }
