Add badarg checks for filter/2, automate coverage check