Test and fix for GRAILS-10684: NPE in AbstractCharReplacementEncoder:75 if toString() returns null