Adding missing imports
Some NPE safety
Merge branch 'master' of git://github.com/geoserver/geoserver