Document categories with children adding a null child

Situation
I have customized document categories, but it is showing an extra child showing null and parent_id = 0.

I can´t delete them. If I create a new category it will show no child nodes, but if I add one or more children then a null value will also been shown as well.
I have queried the table and it doesn´t show any null children.

OpenEMR Version
I’m using OpenEMR version 7.0.1

Browser:
I’m using: chrome

Operating System
I’m using: Ubuntu 22

Search
Did you search the forum for similar questions? Yes.

Logs
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

I was able to find two errors on logs
Undefined array key “value” in /var/www/html/controllers/C_DocumentCategory.class.php on line 192

So I added this line
if ($id === 0 && !empty($ar)) {
$info = $this->tree->get_node_info($id);

// Check if $info['value'] is set and not null
**if (isset($info['value']) && $info['value'] !== null) {**
    $node->addItem(new HTML_TreeNode(array(
        'text' => $info['value'],
        'link' => $this->_link("add_node", true) . "parent_id=" . urlencode($id) . "&",
        'icon' => $icon,
        'expandedIcon' => $expandedIcon
    )));
**}**

}

Then I found another error Undefined array key “value” in /var/www/html/controllers/C_Document.class.php on line 1154

This is the updated block

$info = $this->tree->get_node_info($id);

// Check if $info['value'] is set and not null
**if (isset($info['value']) && $info['value'] !== null) {**
    $current_node = &$node->addItem(new HTML_TreeNode(array(
        "id" => $id,
        'text' => $info['value'],
        'link' => $this->_link("upload") . "parent_id=" . $id . "&",
        'icon' => $icon,
        'expandedIcon' => $expandedIcon
    )));
**}**

}