write.ifNullGoto("field_is_null_" + field.getName());
}
// coerce value
if (field.getCoercion() != null) {
write.invokeStatic(field.getCoercion().getToThrift());
// if coerced value is null, don't write the field
if (!isProtocolTypeJavaPrimitive(field)) {
write.dup();
write.ifNullGoto("field_is_null_" + field.getName());