     public func dictionary() -> Dictionary<String, Any> {
         var dict = [String: Any]()
         
-        dict["productFolder"] = serialize(entity: productFolder, metaOnly: true)
-        dict["product"] = serialize(entity: product, metaOnly: true)
+        if type(of: serialize(entity: productFolder, metaOnly: false)) != type(of: NSNull()) {
+            dict["productFolder"] = serialize(entity: productFolder, metaOnly: false)
+        }
+        
+        if type(of: serialize(entity: product, metaOnly: false)) != type(of: NSNull()) {
+            dict["product"] = serialize(entity: product, metaOnly: false)
+        }
+        
         dict["components"] = components.flatMap { $0.value() }.map { $0.dictionary(metaOnly: false) }
         
         return dict

        
        dict["accountId"] = accountId
        dict["shared"] = shared
        dict["productFolder"] = serialize(entity: productFolder, metaOnly: true)
        dict["article"] = article ?? NSNull()
        dict["code"] = code ?? NSNull()
        dict["description"] = description ?? NSNull()
        dict["buyPrice"] = buyPrice?.dictionary() ?? NSNull()
        dict["supplier"] = serialize(entity: supplier, metaOnly: true)
        dict["image"] = image?.dictionary() ?? NSNull()
        dict["salePrices"] = salePrices.map { $0.dictionary() }
        
        return dict

        dict["pathName"] = pathName ?? ""
        dict["vat"] = vat ?? 0
        dict["effectiveVat"] = effectiveVat ?? 0
        dict["article"] = article ?? ""
        dict["weighed"] = weighed
        dict["weight"] = weight 
        dict["volume"] = volume
        dict["modificationsCount"] = modificationsCount ?? 0
        dict["minimumBalance"] = minimumBalance ?? 0
        dict["isSerialTrackable"] = isSerialTrackable
        dict["stock"] = stock ?? 0
        dict["reserve"] = reserve ?? 0
        dict["inTransit"] = inTransit ?? 0
        dict["quantity"] = quantity ?? 0
        dict["description"] = description ?? ""
        dict["salePrices"] = salePrices.map { $0.dictionary() }
        dict["assortmentInfo"] = assortmentInfo.dictionary()
        dict["barcodes"] = barcodes
