I think you have extra brackets you don't need here, should be:
if ($j.trim(input.val()) != '' || self.options.doSearchWhenEmpty)