Avoid pushing undefined into proto-list

If `json(a)` returns undefined we push undefined into proto-list.

Proto-list gets confused and inserts a weird object into the
proto list tree.

We should avoid pushing anything if `json()` returns nothing.

cc @dominictarr @isaacs