Test (and fix) for case when relation is None