Check config type using `type` instead of `isinstance`
This seems like the textbook case where using `type` should be preferred over using `isinstance`.

Thanks to @hjptriplebee for showing the way in https://github.com/huggingface/transformers/pull/6870, this PR does the same for all remaining cases.
In that case we can even remove the for loops entirely, no?<|||||>I agree with @julien-c, we can directly check if `type(config)` is in the dict.<|||||># [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=h1) Report
> Merging [#7363](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/0cffa424f855cbbd657c4f1b57f94a51b7aa8d6d?el=desc) will **increase** coverage by `0.22%`.
> The diff coverage is `43.52%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/7363/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #7363      +/-   ##
==========================================
+ Coverage   76.51%   76.73%   +0.22%     
==========================================
  Files         181      181              
  Lines       34851    34811      -40     
==========================================
+ Hits        26666    26713      +47     
+ Misses       8185     8098      -87     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/7363/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hdXRvLnB5) | `74.30% <25.00%> (+4.95%)` | :arrow_up: |
| [src/transformers/modeling\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/7363/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `87.04% <55.00%> (+3.00%)` | :arrow_up: |
| [src/transformers/tokenization\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/7363/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYXV0by5weQ==) | `92.53% <100.00%> (ø)` | |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/7363/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `83.37% <0.00%> (+0.24%)` | :arrow_up: |
| [src/transformers/tokenization\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/7363/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `88.28% <0.00%> (+55.85%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=footer). Last update [0cffa42...1833b45](https://codecov.io/gh/huggingface/transformers/pull/7363?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>Done! @julien-c @sgugger <|||||>This is faster than catching a KeyError, that's what you do it that way?