fixes bug GEOT-4514, handling null geometry objects, forward port of #236
Merge branch 'master' of git://github.com/geotools/geotools