Refactors the cops_controller#index action and the corresponding cop#find_by_badge_or_name method. Filters out the empty search params in a private controller method.