public function relationshipValue($key)
{
if (!$this->hasValue($key) || !$this->value($key) instanceof Relationship) {
throw new \InvalidArgumentException(sprintf('value for %s is not of type %s', $key, Relationship::class));
}
return $this->value($key);
}