Fix potential serialization issues for nil objects.
More Mantle updates.