diff --git a/code/javascript/selenium-api.js b/code/javascript/selenium-api.js
index <HASH>..<HASH> 100644
--- a/code/javascript/selenium-api.js
+++ b/code/javascript/selenium-api.js
@@ -237,6 +237,9 @@ Selenium.prototype.getText = function(locator) {
  */
 Selenium.prototype.assertChecked = function(locator) {
     var element = this.page().findElement(locator);
+    if (element.checked == null) {
+        Assert.fail("Element " + locator + " is not a toggle-button.");
+    }
     if (! element.checked) {
         Assert.fail("Element " + locator + " is not checked.");
     }
Check that the thing we're checking can be checked.


r<I>