'toPass' is a Type. There are 2 overloads for ProduceDotNetTypeName:
internal static string ProduceDotNetTypeName(IFieldElementCore field, Project currentProject, string nullablePattern)
and
internal static string ProduceDotNetTypeName(Type dotNetType, Project currentProject, string nullablePattern)
The first is used pretty much all over and just calls the second passing the field.FieldType.RepresentedType. No IsOptional is passed, the second looks to handle the "PreferBinaryTypeOverByteArray" setting.
Brian