To answer the second part of your question, if you want to avoid the exception when the list is empty and return some double value, use orElse instead of getAsDouble:
return weightChanges.stream()
.mapToDouble(WeightChange::getValue)
.average()
.orElse(Double.NaN);