get_term_by with a variable

you can look at line 874 in /wp-includes/taxonomy.php for the function itself. the value has stripslashes applied and then it’s used in a prepared statement, so I’d say it’s safe. but there’s nothing stopping you from checking the value yourself first if you know what parameters it will always fall within, like ctype_alnum or something. then check if(empty($term)), to see if anything matched and print something else if not.