Fix error when rendering `undefined`
Add pretty-printing