I am display table rows in my email template...
<tr>
<td>{!relatedTo.opportunity__r.name}</td>
<td>{!relatedTo.opportunity__r.stageName}</td>
</tr>
However it is possible for opportunity__r to be null. I only want to add a row if the my custom object is pointing to a valid opportunity.
Any tips?