Fix psuh_to_hub in Trainer when nothing needs pushing
# What does this PR do?

This PR fixes `push_to_hub` in the `Trainer`. Since `Repository.push_to_hub`can return `None` or a tuple, we have to do a small test before unpacking the output.

Fixes #23712
_The documentation is not available anymore as the PR was closed or merged._