Canonicalise filter input