I have the following code
When I show the nodes that are in the group, 2 appear
Because I only have 2 node in that group, and in my whole project

But when I use the loop to print the nodes
At the end of all I get a null
.
@onready var enemies = get_tree().get_nodes_in_group("enemy")
func _ready():
print(enemies)
print(print_enemies(enemies))
pass
func print_enemies(enemies_groups):
for enemy in enemies_groups :
if enemy != null:
print(enemy)
.
Here is the example of what I get
all nodes in group enemy
[MyEnemy:<Sprite2D#25753027719>, MyEnemy3:<Sprite2D#25786582153>]
loop
MyEnemy:<Sprite2D#25753027719>
MyEnemy3:<Sprite2D#25786582153>
<null>
Why does that null appear? How do I make it not appear?