codec: encode invalid values as nil.
codec: encode invalid values as nil.

Fixes #40

sunvim/go,sunvim/go,whyrusleeping/go-codec,ugorji/go,methane/go-codec,whyrusleeping/go-codec,ugorji/go,ugorji/go,methane/go-codec,methane/go-codec,whyrusleeping/go-codec,sunvim/go