Fixed exception with generic Geometry type in WMS GetLegendGraphic

An exception was thrown using GetLegendGraphic WMS operation on a layer with a geometry type of GEOMETRY:

java.lang.IllegalArgumentException: class com.vividsolutions.jts.geom.Geometry is not supported by this method
 at org.geotools.data.DataUtilities.defaultValue(DataUtilities.java:997)
 at org.geotools.feature.simple.SimpleFeatureBuilder.convert(SimpleFeatureBuilder.java:316)
 at org.geotools.feature.simple.SimpleFeatureBuilder.set(SimpleFeatureBuilder.java:297)
 at org.geotools.feature.simple.SimpleFeatureBuilder.add(SimpleFeatureBuilder.java:220)
 at org.geotools.feature.simple.SimpleFeatureBuilder.template(SimpleFeatureBuilder.java:502)
 at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.createSampleFeature(BufferedImageLegendGraphicBuilder.java:534