if/else for empty search field