} else if (_eo.valueForKey(masterKey) == null) {
} else if (_eo.valueForKey(masterKey) != null) {
    public void updateSourceObject(Object anEO) {        String masterKey = _localRelationshipKey();        Object aSourceObject = _localSourceObject();        boolean isDictionary = (aSourceObject instanceof NSMutableDictionary);        NSMutableDictionary _dictionary = (isDictionary) ? (NSMutableDictionary)aSourceObject : null;        EOEnterpriseObject _eo = !(isDictionary) ? (EOEnterpriseObject)aSourceObject : null;        EOEnterpriseObject localEO = !isDictionary && anEO != null ?            ERXUtilities.localInstanceOfObject(_eo.editingContext(), (EOEnterpriseObject)anEO) : null;        // Need to handle the keyPath situation.        if (_eo != null && masterKey.indexOf(".") != -1) {            String partialKeyPath=ERXStringUtilities.keyPathWithoutLastProperty(masterKey);            _eo = (EOEnterpriseObject)_eo.valueForKeyPath(partialKeyPath);            masterKey = ERXStringUtilities.lastPropertyKeyInKeyPath(masterKey);        }        if (anEO!=null) {            if (isDictionary) {                _dictionary.setObjectForKey(anEO, masterKey);            } else if (_eo.valueForKeyPath(masterKey) != localEO) {                _eo.addObjectToBothSidesOfRelationshipWithKey((EOEnterpriseObject)anEO, masterKey);            }        } else { // setting to "nil"            if (isDictionary) {                _dictionary.removeObjectForKey(masterKey);            } else if (_eo.valueForKey(masterKey) == null) {                // WO5FIXME                //|| _eo.valueForKey(masterKey) != EONullValue.nullValue()) {                _eo.removeObjectFromBothSidesOfRelationshipWithKey((EOEnterpriseObject )_eo.valueForKey(masterKey), masterKey);            }        }    }