Fixes packing/unpacking with nil values

Related to #1