public function check_chunks($type, $check) {
        if (array_key_exists($type, $this->_chunks)) {
            foreach (array_keys($this->_chunks[$type]) as $typekey) {
                list($key, $data) = explode("\0", $this->_chunks[$type][$typekey]);

                if (strcmp($key, $check) == 0) {
                    debugging('Key "' . $check . '" already exists in "' . $type . '" chunk.');
                    return false;
                }
            }
        }
        return true;
    }