Some objects (Datomic entity in my case) cannot be used with postwalk and will throw. A call to postwalk should be wrapped in try catch with catch implementing a fallback (perhaps returning the unsorted object if it does not break the code that uses the sorted object afterwards).