         guard let destinationEntityName = destinationEntity.name else { fatalError("entityName not found in entity: \(destinationEntity)") }
         guard let entity = NSEntityDescription.entityForName(destinationEntityName, inManagedObjectContext: managedObjectContext) else { return }
         if localPrimaryKey is NSNull {
-            if let _ = valueForKey(relationship.name) {
+            if valueForKey(relationship.name) != nil {
                 setValue(nil, forKey: relationship.name)
             }
         } else {

        guard let destinationEntity = relationship.destinationEntity else { fatalError("destinationEntity not found in relationship: \(relationship)") }
        guard let destinationEntityName = destinationEntity.name else { fatalError("entityName not found in entity: \(destinationEntity)") }
        if localPrimaryKey is NSNull {
            if let _ = valueForKey(relationship.name) {
                setValue(nil, forKey: relationship.name)
            }
        } else if let safeObject = managedObjectContext.sync_safeObject(destinationEntityName, localPrimaryKey: localPrimaryKey, parent: self, parentRelationshipName: relationship.name) {

     */
    func sync_toManyRelationship(relationship: NSRelationshipDescription, dictionary: [String : AnyObject], parent: NSManagedObject?, parentRelationship: NSRelationshipDescription?, dataStack: DATAStack, operations: DATAFilter.Operation) {
        var children: [[String : AnyObject]]?
        let childrenIsNull = relationship.userInfo?[SYNCCustomRemoteKey] is NSNull || dictionary[relationship.name.hyp_remoteString()] is NSNull || dictionary[relationship.name] is NSNull
        if childrenIsNull {
            children = [[String : AnyObject]]()

            if valueForKey(relationship.name) != nil {
