Attempts to get a value by key, cast to the specified type, without throwing.
public bool TryGet<T>(string key, scoped out T? value)
The key to look up.
When this method returns, contains the value cast to T,
or default when the key does not exist, the stored value is
null, or the value cannot be cast to T.
true when the key exists and the value is of (or assignable to)
T; otherwise, false. This method never throws,
per the Try* convention.