I think we need to make sure to add the proper object null handling while using the scriban, as an example below.
{{ if i_item.propertyname != "" }}
{{ end }}
or, in case if you are using the custom Scriban extension or trying to read the object property
{{ if object!= null }}
or
{{ if object }}
Add the proper formatting for the scriban scripts so it is easy to read