[BUGFIX] Check existance of media elemens in importer

To avoid errors, check if the media element even exists.

Change-Id: Ib1df05da8bf4a954339a326b4833085d8c6b2d44
Resolves: #57782
Reviewed-on: https://review.typo3.org/29372
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer