Add WP error check on taxonomies
Check function template_get_post_type exists