 (use-logging)
 
 (defn _id-to-id [mongo-object]
-  (if (nil? mongo-object)
-    nil
+  (when mongo-object
     (let [id (str (:_id mongo-object))]
       (-> mongo-object (dissoc :_id) (assoc :id id)))))
 
 (defn id-to-sid [mongo-object]
-  (if (nil? mongo-object)
-    nil
+  (when mongo-object
     (-> mongo-object (assoc :sid (:id mongo-object)))))
 
 (defn own? [user dbo]

      (error "Db object deleted or not own. Refusing to update: " user params id))))

(defn generate-publication-date [blog]
  (assoc blog :published (local/local-now)))

(defn publish [user params]
  (let [id (:id params)

  (:use
        [s3 log mongodb parser formats utils])
  (:require [monger.collection :as mc]
            [s3.mongoquery :as querystr]
            [monger.result :as mr]
            [monger.query :as mq]
            [monger.conversion]
