Godot has a function called "typeof" that returns the type of the variable. Here is an example of how to use it:
Here is a list with all types typeof() can return:
https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#enum-globalscope-variant-type