is_taxonomy is deprecated. What’s the alternative?

See Codex page for is_taxonomy

This function is deprecated as of Version 3.0. Please use taxonomy_exists instead.

wp_insert_term uses taxonomy_exists to check if the taxonomy exists. This means if the taxonomy is a registered taxonomy. (It would be odd if wp_insert_term only you allowed to add a term to taxonomies with existing terms 🙂 )

To catch an error you can use is_wp_error. E.g.

$result = wp_insert_term(...);
if ( is_wp_error( $result ) ) {
   $error_string = $result->get_error_message();
   echo '<div id="message" class="error"><p>' . $error_string . '</p> </div>';
}else{
   list($term_id,$taxonomy_id) = $result;
 }

error code: 523