Fixes packing/unpacking with nil values

Related to #1
Merge pull request #2 from ignacio/patch-1

Fixes packing/unpacking with nil values