Simplify checkProtoChain-function