           (key/lexicoder [:integer :bar]))
         "should not accept any config parameters"))
   (testing "bad values"
+    (is (thrown? IllegalArgumentException
+          (key/encode key/integer-lexicoder nil))
+        "should not encode nil")
     (is (thrown? IllegalArgumentException
           (key/encode key/integer-lexicoder 0.0))
         "should not encode non-integers")

        "should not accept any config parameters"))
  (testing "bad values"
    (is (thrown? IllegalArgumentException
          (key/encode key/float-lexicoder 123))
        "should not encode non-floats")
    (is (thrown? IllegalArgumentException

        "should only accept one config parameter"))
  (testing "bad values"
    (is (thrown? IllegalArgumentException
          (key/encode key/string-lexicoder nil))
        "should not encode nil")
    (is (thrown? IllegalArgumentException
          (key/encode key/string-lexicoder 123))
        "should not encode non-strings")
    (is (thrown? IllegalArgumentException
