Fixes crash when `compute_metrics` is not passed to `Trainer` in run_mlm example
# What does this PR do?

If I'm understanding the example run_mlm code correctly, the `metrics` attribute will not be present on the `train_result` object if `compute_metrics` is not passed to `Trainer`. This edit prevents the script from attempting to write the metrics to file if they don't exist. 

## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors which may be interested in your PR.

@sgugger 
@stas00 
 

In master `train` always returns `metrics`.

Is it possible that you are running the script from master but loading `transformers` that is pre-installed and it is not master? This metrics was added just recently.

Do you still get the error if you do:
```
git clone https://github.com/huggingface/transformers/
cd transformers
PYTHONPATH=src examples/language-modeling/run_mlm.py ...
```
This ensures that you're using the master version in the script.

Or alternatively if you tend to use the master a lot, install it with `pip install -e .[dev]` which allows you to `git pull` and not needing to reinstall anything.

To verify that there is no problem in master I have just run:

```
python run_mlm.py --model_name_or_path roberta-base --dataset_name wikitext \
--dataset_config_name wikitext-2-raw-v1 --do_train --output_dir /tmp/test-mlm
```
and got:
```
INFO|trainer.py:1248] 2020-12-29 22:49:16,276 >> Saving model checkpoint to /tmp/test-mlm
[INFO|configuration_utils.py:289] 2020-12-29 22:49:16,277 >> Configuration saved in /tmp/test-mlm/config.json
[INFO|modeling_utils.py:814] 2020-12-29 22:49:16,818 >> Model weights saved in /tmp/test-mlm/pytorch_model.bin
12/29/2020 22:49:16 - INFO - __main__ -   ***** Train results *****
12/29/2020 22:49:16 - INFO - __main__ -     epoch = 3.0
12/29/2020 22:49:16 - INFO - __main__ -     train_runtime = 383.9452
12/29/2020 22:49:16 - INFO - __main__ -     train_samples_per_second = 4.688
```

So all seems to be in norm.
<|||||>Thanks for taking a look @stas00 and for the examples ! You are correct, I had transformers 4.1.1. Looks fine when run on master. I'll close this PR 