Implement a ofType filter for filtering items of a specified type