Allow subclasses of the specified class

This opens up the filter to allow it work with subclasses. This is
useful when using something like STI.