public static int? GetIntFrom(IAtomCollection collection, ID4 name) { var atom = collection.FindByName(name); int value = 0; if (atom != null && atom.TryGetInt32(out value)) { return value; } else { return null; } }