Fix potential NPE in import handling of content groups
The handling of content groups did not check for the case that no contents/content groups exist.
The handling of content groups did not check for the case that no contents/content groups exist.