Add $hasRelated method to determine if relation exists