// Checking for existence before preloading bypasses the error: if(user.settingId) { await user.preload("setting") }