Proper handling of value types