Add a condition for checking labels
# What does this PR do?

This PR adds stability by checking whether it has labels before returning it in `prediction_step` of `Seq2SeqTrainer`
There is a similar condition in [`prediction_step` of `Trainer`](https://github.com/huggingface/transformers/blob/master/src/transformers/trainer.py#L2460-L2465)
```python
if has_labels:
    labels = nested_detach(tuple(inputs.get(name) for name in self.label_names))
    if len(labels) == 1:
        labels = labels[0]
else:
    labels = None
```

## Before submitting

- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?


## Who can review?

For `trainer` : @sgugger
