Fixed where clause being built when search is empty string, which caused...

... records with nil values to be excluded