checks if relationships exist