gcontenttype: Fix a potential g_object_unref(NULL) call