Added validation for relationship