Check method arguments
Avoid memory leaks
Prevent recursion in serialization