Godot - Check if variable is Node
GDScript code example to check if variable contains Node with if~is statement.
Can check if variable contains Node with if~is statement in GDScript.
All Nodes are identified as "Node" with if~is statement.
var node = get_node("Sprite2D")
if node is Node:
print("node is Node")
else:
print("Not a Node")