@MLNov I don;t really see that as an error since you already know that there may not be that information there you're just unhappy it's displaying null.
You might be able to get around it by condition coding the field:
<#if transaction.entity?has_content>
${transaction.entity}
</#if>