Ensure connection exists before executing batch queries

Like  `client.execute`, ensure connection exists for `client.batch`.