Check if media exists before trying to embed it