Handle marshalling/unmarshalling of nil values

Attempting to store nil as a key value causes a Marshal#dump error, because nil is explicitly not marshalled (and is therefore stored as nil#to_s == "", which cannot be unmarshalled). I wasn't sure of the reason for this, but I couldn't find a reason. This patch makes nil work correctly, at least in my use case, mainly storing it as a value in a HashKey.