This is inside a method (basically its just this), I try to get the neededValue otherwise I pass back what was passed in...private static string GetNeededValue(string param)    {        string tValue = ;        if (!string.IsNullOrEmpty(param))        {            var map = repo.Item(string.Format(CoverageName LIKE '{0}',param));            tValue = map == null ? param : map.theNeededValue;        }        return tValue;                }
just making sure this is efficient, for the null checks
c#
Yes, it seems fine from an efficiency point of view. Here's a couple of simple alternatives you could consider.Remove the need for the ! condition.  I quite like this option as I think it flows nicely and is easy to read.private static string GetNeededValue(string param){   // do we care about whitespace.  If so you could use IsNullOrWhiteSpace   if(string.IsNullOrEmpty(param)) return param;   var map = repo.Item(string.Format(CoverageName LIKE '{0}',param));   return map == null ? param : map.theNeededValue; }Or another alternative might be to be more explicit about when tValue is set.private static string GetNeededValue(string param){   var tValue = param;   // do we care about whitespace.  If so you could use IsNullOrWhiteSpace   if(!string.IsNullOrEmpty(tValue))      var map = repo.Item(string.Format(CoverageName LIKE '{0}',tValue));      if(map != null)         tValue = map.theNeededValue;     }   return tValue;}