 
   (when (contains? opts :closure-warnings)
     (doseq [[type level] (:closure-warnings opts)]
-      (. closure-opts (setWarningLevel (get warning-types type) (get check-levels level)))))
+      (let [group (get warning-types type)
+            check-level (get check-levels level)]
+        (if-not (and group check-level)
+          (util/warn state {:type ::invalid-closure-warning :key type :level level})
+          (. closure-opts (setWarningLevel group check-level))))))
 
   (when (contains? opts :closure-extra-annotations)
     (. closure-opts (setExtraAnnotationNames (map name (:closure-extra-annotations opts)))))

          ;; (js/React...) will otherwise just work without externs
          (.setWarningLevel DiagnosticGroups/UNDEFINED_VARIABLES CheckLevel/WARNING))]

    (set-options closure-opts compiler-options)

    (when source-map?
      ;; FIXME: path is not used at all but needs to be set


        co
        (doto (make-options)
          (set-options co-opts state))

        co
        (if (false? (get-in state [:compiler-options :rewrite-polyfills]))
