Hey zubzob,
In godot3.1 you can use the classname keyword for this. If you set up your script like this:
extends whatever
class_name MySpecialNode
...
Then you can use:
var node = get_node("lalala")
if node is MySpecialNode:
print("lol it works")
Hope it works :) Good luck!