code: private static MonolingualTextValue toTerm(MonolingualTextValue term) {
  		return term instanceof TermImpl ? term : new TermImpl(term.getLanguageCode(), term.getText());
  	}
docs: We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.