             managedNode.managedObjectContext?.performAndWait { [unowned self] in
                 n = self.managedNode.object
             }
-            return nil == n ? nil : Entity(managedNode: n!)
+            return n.map { Entity(managedNode: $0) }
         }
         set(entity) {
             managedNode.managedObjectContext?.performAndWait { [unowned self] in

    }
}

public func <=(lhs: Relationship, rhs: Relationship) -> Bool {
    return lhs.id <= rhs.id
}

public func >=(lhs: Relationship, rhs: Relationship) -> Bool {
    return lhs.id >= rhs.id
}

public func >(lhs: Relationship, rhs: Relationship) -> Bool {
    return lhs.id > rhs.id
}

public func <(lhs: Relationship, rhs: Relationship) -> Bool {
    return lhs.id < rhs.id
}

            managedNode.managedObjectContext?.performAndWait { [unowned self] in
                n = self.managedNode.subject
            }

            return n.map { Entity(managedNode: $0) }
        }
        set(entity) {
            managedNode.managedObjectContext?.performAndWait { [unowned self] in
