Checks whether a node can be used in a forum, based on its content type.
\Drupal\Core\Entity\EntityInterface $node: A node entity.
Boolean indicating if the node can be assigned to a forum.
function _forum_node_check_node_type(EntityInterface $node) {
// Fetch information about the forum field.
$instance = field_info_instance('node', 'taxonomy_forums', $node->type);
return !empty($instance);
}