   If the record is nil, processing is skipped but
   the progress is updated."
   [context record record-type]
-  (swap! context #(if record
-                    (process-record % record record-type)
+  (swap! context #(cond-> %
+                    record
+                    (process-record record record-type)
+
+                    true
                     (inc-and-update-progress % record-type))))
 
 (defn import-data


(defmethod process-record :account
  [context account _]
  (-> context
      (import-account account)
      (inc-and-update-progress :account)))

(defmethod process-record :transaction
  [context transaction _]
  (-> context
      (import-transaction transaction)
      (inc-and-update-progress :transaction)))

(defmethod process-record :budget
  [context budget _]
  (-> context
      (import-budget budget)
      (inc-and-update-progress :budget)))

(defmethod process-record :price
  [{:keys [storage entity] :as context} price _]

                       first)]
    (prices/create storage (-> price
                               (assoc :commodity-id (:id commodity))
                               (dissoc :exchange :symbol)))))

(defmethod process-record :commodity
  [{:keys [entity storage] :as context} commodity _]
