not bragging, but no seg fault: StrToType fixed to query database for data type of filtering value