Fix wrong image conditional checking
Apparently, If an empty batch comes in, it is considered valid. However, then line 138 brakes since it tries to access element 0 of an empty batch.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_16927). All of your documentation changes will be reflected on that endpoint.<|||||>Hi,

Thanks for your PR. If we go ahead with this, then it should also be fixed for all other feature extractors, like ViT, BEiT, DeiT, etc. cc @patil-suraj <|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.<|||||>Gently pinging @Charlyo, let me know if you want to finish this, otherwise happy to take over :) <|||||>Sorry guys! Feel free to take over @patil-suraj  :)<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.