Implement a ofType filter for filtering items of a specified type

Maybe it should be ofClass instead of ofType?