Fix EZP-22032: don't create an empty ezmedia row

eZMediaType was creating the ezmedia persistent object even if no media file was selected.