diff --git a/core/misc/states.es6.js b/core/misc/states.es6.js
index ccf9993718..6fce785d35 100644
--- a/core/misc/states.es6.js
+++ b/core/misc/states.es6.js
@@ -227,6 +227,21 @@
      */
     compare(reference, selector, state) {
       const value = this.values[selector][state.name];
+
+      // IE11 and below don't support using states.Dependent.comparisons
+      // directly. If support for IE11 is dropped this should be removed and
+      // reference.constructor.name can be used directly in the last if
+      // statement.
+      let name = reference.constructor.name;
+      if (!name) {
+        name = $.type(reference);
+        // Capitalize to match the constructor name.
+        name = name.charAt(0).toUpperCase() + name.slice(1);
+      }
+      if (states.Dependent.comparisons.hasOwnProperty(name)) {
+        return states.Dependent.comparisons[name](reference, value);
+      }
+
       if (reference.constructor.name in states.Dependent.comparisons) {
         // Use a custom compare function for certain reference value types.
         return states.Dependent.comparisons[reference.constructor.name](
diff --git a/core/misc/states.js b/core/misc/states.js
index 1da26592bc..9414bc05e7 100644
--- a/core/misc/states.js
+++ b/core/misc/states.js
@@ -110,6 +110,17 @@
     },
     compare: function compare(reference, selector, state) {
       var value = this.values[selector][state.name];
+
+      var name = reference.constructor.name;
+      if (!name) {
+        name = $.type(reference);
+
+        name = name.charAt(0).toUpperCase() + name.slice(1);
+      }
+      if (states.Dependent.comparisons.hasOwnProperty(name)) {
+        return states.Dependent.comparisons[name](reference, value);
+      }
+
       if (reference.constructor.name in states.Dependent.comparisons) {
         return states.Dependent.comparisons[reference.constructor.name](reference, value);
       }