Add wormhole state check function