public static function is_defaulticon_allowed($mimetype, $oldextension = '') {
        $mimeinfo = get_mimetypes_array();
        if ($oldextension !== '') {
            unset($mimeinfo[$oldextension]);
        }
        foreach ($mimeinfo as $extension => $values) {
            if ($values['type'] !== $mimetype) {
                continue;
            }
            if (!empty($values['defaulticon'])) {
                return false;
            }
        }
        return true;
    }