What's the right way to handle null bean properties in a GXT XTemplate?


Assume for example, I have a bean 'trucker' with some string properties, say 'remitToCity' and an XTemplate that looks like this:


Code:
"City: {remitToCity}"
I would have thought that if the 'remitToCity' bean property is null, I would just get "City: " as an output result. Instead, I get an exception in dev mode. Partial stack trace below:


Code:
Caused by: java.lang.NullPointerException: null
at com.google.gwt.safehtml.shared.SafeHtmlUtils.htmlEscape(SafeHtmlUtils.java:156)
at com.exworks.client.TruckerGrid_RemitToTemplate_remitToAddress_SafeHtml__TruckerDto_truckerDto___SafeHtmlTemplatesImpl.remitToAddress4(TruckerGrid_RemitToTemplateremitToAddress_SafeHtml__TruckerDto_truckerDto___SafeHtmlTemplatesImpl.java:39)
at com.exworks.client.TruckerGrid_RemitToTemplateImpl.remitToAddress(TruckerGrid_RemitToTemplateImpl.java:102)
at com.exworks.client.TruckerGrid$addressCell.render(TruckerGrid.java:61)
at com.exworks.client.TruckerGrid$addressCell.render(TruckerGrid.java:1)
at com.sencha.gxt.widget.core.client.grid.GridView.getRenderedValue(GridView.java:1765)
...
I thought maybe I could just check for null in the template, i.e.


Code:
"City: <tpl if="remitToCity == null">Not Available</tpl><tpl if="remitToCity != null">{remitToCity}</tpl>"
But that always prints "City: " , even when the property contains a non-null value.


I must be missing some obvious concept, but what?