                 # keep traversing
                 return node.map (x) -> postprocess x
     else
-        # some ()s in strings were replaced with (__nil__) when preprocessing
-        return node.replace?('(__nil__)', '()')
+        if typeof node is 'string'
+            # some ()s in strings were replaced with (__nil__) when preprocessing
+            node.replace('(__nil__)', '()')
+        else
+            node
 
 module.exports = ParseSExpr

{Transform} = require 'stream'
lispToArray = require 'lisp-to-array'
_ = require 'lodash'

class ParseSExpr extends Transform

            objectMode: true

    _transform: (chunk, encoding, next) ->
        result = postprocess(lispToArray(preprocess(chunk)))
        # log 'Parser', chunk
        # console.log result
        @push result
        next()

preprocess = (chunk) ->
