add check for dangling relationships in graph