Added boolean checks on relationship arity.