The setup script of a component/compound can only access its own property (can access but cannot modify) and its children’s property (can access and can modify). So there is no way to check the existence of its upper upper level component’s properties. However in order to set the hierarchy structure, you have to pass the property to the current level anyway. And you will get an error message anyway if you set an expression based on a non-existence variable.
I am not so sure about your application, but I think you can check the existence in the upper level and set the setup script in the upper level using the scope sign. That will give you access to all the variables.
I hope this could help, let me know if you have other concerns