check class hierarchy with is_a? in PredicateBuilder.expand

add changelog entry for #11945
Merge pull request #11945 from Mik-die/polymorphic-decorator

check class hierarchy with is_a? in PredicateBuilder.expand