#341 Fixed IF statement in autocomplete query.  

IF statement was checking for a NULL field, but found that the field isn't always NULL, it was sometimes returning an empty string. Added in a check for both a NULL field or an empty string in the field.  

Also protected the concat statement a bit more with IFNULL checks.