   when not all 3 groups dm, m, and s are contained in coord string. Result negative
   when coord in Western or Southern Hemisphere according to ref argument."
   [coord ref]
-  (let [matcher (re-matcher #"(\d{1,3})° (\d{1,2})' (\d{1,2}\.?\d+?)" coord)
-        [_dms d m s] (re-find matcher)]
-    (when (and d m s)
-      (let [d (read-string d)
-            m (read-string m)
-            s (read-string s)
-            dd (float (+ d (/ m 60) (/ s 3600)))]
-        (if (contains? #{"W" "S"} ref)
-          (- dd)
-          dd)))))
+  (when coord
+    (let [matcher (re-matcher #"(\d{1,3})° (\d{1,2})' (\d{1,2}\.?\d+?)" coord)
+          [_dms d m s] (re-find matcher)]
+      (when (and d m s)
+        (let [d (read-string d)
+              m (read-string m)
+              s (read-string s)
+              dd (float (+ d (/ m 60) (/ s 3600)))]
+          (if (contains? #{"W" "S"} ref)
+            (- dd)
+            dd))))))
 
 (defn extract-ts
   "Converts concatenated GPS timestamp strings into milliseconds since epoch.

    'GPS Time-Stamp' '20:07:57.00 UTC'"
  [ts]
  (let [f (tf/formatter "yyyy:MM:dd HH:mm:ss.SS z")]
    (c/to-long (tf/parse f ts))))

(defn extract-from-tag
  "Creates map for a single Exif directory.

  (:require [clojure.pprint :as pp]
            [iwaswhere-web.files :as f]
            [clj-time.coerce :as c]
            [matthiasn.systems-toolbox.component :as st]
            [me.raynes.fs :as fs]
            [clj-time.format :as tf]
            [clojure.tools.logging :as log])
