code: protected <T extends Serializable> Map<String, Object> preSerializer(T serializableObject) {
          Map<String, Object> objReferences = new HashMap<>();
          for(Field field : ReflectionMethods.getAllFields(new LinkedList<>(), serializableObject.getClass())) {
  
              if (field.isAnnotationPresent(BigMap.class)) {
                  field.setAccessible(true);
  
                  try {
                      Object value = field.get(serializableObject);
                      if(!isSerializableBigMap(value)) { //if the field is annotated with BigMap AND the value is not serializable
                          //extract the reference to the object and put it in the map.
                          objReferences.put(field.getName(), value);
                          //then replace the reference with null to avoid serialization.
                          field.set(serializableObject, null);
                      }
                  }
                  catch (IllegalArgumentException | IllegalAccessException ex) {
                      throw new RuntimeException(ex);
                  }
              }
          }
  
          return objReferences;
      }
docs: This method is called before serializing the objects. It extracts all the not-serializable BigMap references
  of the provided object and stores them in a Map. Then it replaces all the references of the provided object
  with nulls to avoid their serialization. The main idea is that we temporarily remove from the object any reference
  that will cause problems during the serialization phase.
  
  @param serializableObject
  @param <T>
  @return