resolve_config(value, default) that returns default if value is "falsy" (e.g. None, 0, "", [], False) and returns value itself otherwise. This mimics how config loaders fall back to defaults without explicit is None checks.resolve_config(0, 10)
10
0 is falsy, so the default is used.
resolve_config("", "guest")"guest"
Empty string is falsy.
resolve_config("admin", "guest")"admin"
"admin" is truthy, so it is kept.
A plain `if not value:` covers all standard falsy values in Python.
Do not special-case each type individually — rely on Python's general truthiness rules.