public static string GetStringFrom(IAtomCollection collection, ID4 name) { string res = null; var atom = collection.FindByName(name); if (atom != null && atom.TryGetString(out res)) { return res; } else { return null; } }