invalid argument for each()

Hello,

I am having a bug on this page:

http://www.mywherecanifind.com/questions/ask/

Warning: Invalid argument supplied for foreach() in /home/content/04/9655804/html/wp-content/themes/parallelus-salutation/functions.php on line 271

The code in the area is:

function qa_widget_show_sub_cats( $cat_args, $instance ) {
global $post;
if ( is_qa_page() ) {
$cats = get_the_terms( $post->ID, 'question_category' );
foreach ( $cats as $category ) {
if ( $category->term_id ) {
$termchildren = get_term_children( $category->term_id, 'question_category' );
if ( $termchildren && !empty( $termchildren ) && !is_object( $termchildren ) ) {
$cat_args['child_of'] = $category->term_id;
break;
}
}
}
}
return $cat_args;
}

Please help me solve it asap.

Thanks a lot.