Fix crash bug when trying to get exif data for a non-image file.