{{#isNullable}}
if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null)
    {{#lambda.pasteLine}}{{/lambda.pasteLine}}
else
    writer.WriteNull("{{baseName}}");
{{/isNullable}}
{{^isNullable}}
{{#lambda.pasteLine}}{{/lambda.pasteLine}}
{{/isNullable}}