title: Distinguishing a record instance from a map
body: <p>I'm trying to call <code>clojure.walk/stringify-keys</code> on a map that might include record instances.  Since stringify-keys is recursive, it attempts to convert the keys on my record, (since <code>(map? record-var)</code> is true) which causes an error.  Is there any way to tell if a var is a record rather than just a Clojure map?  I
  d like to provide my own implementation of <code>stringify-keys</code> that is record-aware. </p>
  
  <p>The current implementation of <code>stringify-keys</code> causes the following:</p>
  
  <pre class="lang-lisp prettyprint-override"><code>(use '[clojure.walk :only [stringify-keys]])
  
  (defrecord Rec [x])    
  
  (let [record (Rec. "foo")
        params {:x "x" :rec record}]
      (stringify-keys params))
  </code></pre>
  
  <p>This causes the following exception: UnsupportedOperationException Can't create empty: user.Rec  user.Rec (NO_SOURCE_FILE:1)</p>