Checks and gets Nodes that is needed to make the relation