Add check to see if parent site has been deleted

#6349