Is there a need to expose the getConfigObject() function outside of the repository?
If getConfigObject() is referenced externally, the responsibility of checking the state of the internal properties of the configuration object shifts to the external object.
If external objects don't care about the remote/local state of reference data, it seems valid to update the config object inside the repository with a null check on section.title.
// In repository..
fun getSectionTitle(): String {
var title: String?
do {
// Assuming that each call would update the state.
title = getConfigFile()?.section?.title
} while (title == null)
return title
}