Add empty string check to similar search

It causes SEGV.

[groonga-dev,01346]

Reported by Nakai Kanako. Thanks!!!