                     
                     convertedValue = .Relationship(.ToMany(resourceIDs))
                 }
-                
-                convertedValues[key] = convertedValue
             }
             
-            else { convertedValues[key] = .Null }
+            else { convertedValue = .Null }
+            
+            convertedValues[key] = convertedValue
         }
 
         return convertedValues

        
        var convertedValues = ValuesObject()
        
        /*
        // convert attributes
        for (key, attribute) in self.attributes {
            

            
            convertedValues[key] = value
        }
        
        // convert relationships
        for (key, relationship) in self.relationships {
            
            let convertedValue: Value
            
            if let jsonValue = JSONObject[key] {
                
                switch relationship.type {
                    
