Fixed empty string check in search().