fix null pointer while looking for super klass match