MDL-46792 core_group: Check that $data->name is set before trimming

Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
MDL-46792 core_group: Modify unit tests to remove 'name' property

Signed-off-by: Tony Butler <tonyjbutler@gmail.com>