add assertion to defineFIlter API