RNA: simplify space type items code, no need to have this duplicated.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@57343 954f8c5b-7b00-dc11-b283-0030488c597c
Fix bug in vertex group code after recent changes, did not do proper NULL
pointer check.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@57344 954f8c5b-7b00-dc11-b283-0030488c597c