Checking whether tree can be build or not