private Object handleUid(Object tos, String tagName) {
      if ((tos instanceof PersonFamilyCommonContainer && ((PersonFamilyCommonContainer)tos).getUid() == null) ||
          (tos instanceof EventFact && ((EventFact)tos).getUid() == null) ||
          (tos instanceof Source && ((Source)tos).getUid() == null)) {
         if (tos instanceof PersonFamilyCommonContainer) {
            ((PersonFamilyCommonContainer)tos).setUidTag(tagName);
         }
         else if (tos instanceof EventFact) {
            ((EventFact)tos).setUidTag(tagName);
         }
         else {
            ((Source)tos).setUidTag(tagName);
         }
         return new FieldRef(tos, "Uid");
      }
      return null;
   }