Allowed ObjectIds to be serialized

This allows us to serialize ObjectIds using our current method.