checks for null relationship