Avoid NPE
Fixes filtering classes according to "extending" setting