Validate arguments.