minor fix: adding precondition check for filters.