public function check($item, $whitelist = null)
    {
        if ($whitelist !== null) {
            $this->set($whitelist);
        }
        
        if (empty($item) or empty($this->whitelist)) {
            return false;
        }
        
        foreach ($this->whitelist as $regexp) {
            if (preg_match("#$regexp#", $item)) {
                return true;
            }
        }

        return false;
    }