My developer created this code:
if (!(bindable is BaseGrid template)) return; if (template == null) return;