Added utility functions for serializing arguments.