Fix NPE using trim function with jdbc

Symbol's have a null family, so switch on the family gives an NPE.