handling strings in criterias <, <=, >, >=

String comparison is a common use case. This PR is a fix for errors occurring when doing string comparisons.