Validate empty inputs before performing the search. Fixes issue #26