simplify check in hdnode_from_xpub