Return value as a TOML table when it has the expected runtime shape.
tomllib parses TOML tables as string-keyed dicts, which ty cannot infer
from a runtime dict check. Keep the cast at this boundary so it does not
become a general-purpose escape hatch - now more important, not less, since
the helper became importable from a shared module.