Can I use get_term_children to show child terms if they exist and show something else if they don’t?

if ( ! isset($term_taxons->errors)) { ?>
   Show Child Taxons
<?php } else { ?>
   SHOW PRODUCTS
<?php } ?>

get_term_children returns a WP_error on failure.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)