Add the filtering type function