(ExportRenderer.render_legend): Check that a layer has a classification before trying to get it. Raster layers don't have classifications.