Here\'s the scenario...
if (entry.Properties[\"something\"].Value != null) attribs.something = entry.Properties[\"something\"].Value.ToString(); <
if (entry.Properties[\"something\"].Value != null) attribs.something = entry.Properties[\"something\"].Value.ToString();
To do precisely what you're trying to do a helper method can always be used:
CopyIfNotNull(entry.Properties["something"].Value, out attribs.something); void CopyIfNotNull(string src, out string dest) { if(src != null) dest = src; }