TypeError thrown

Argument 1 passed to bb_IsInsectClassCategory() must be an instance of WP_Term, instance of WP_Error given, called in /home/deb118619/domains/kerfdier.nl/public_html/wp-content/themes/spun-child/functions-insectorder.php on line 709