title: XAttribute default value if not existing on XElement
body: <p>Is there an easier/better way to return a default value if a XAttribute on a XElement is not existing?:</p>
  
  <p>I'm trying to write this in a shorter way (cause it's a two-liner):</p>
  
  <pre><code>var a = root.Attribute("testAttribute");
  var v = (a == null ? "" : a.Value);
  </code></pre>
  
  <p>My approach: via an extension method:</p>
  
  <pre><code>public static XAttribute Attribute(this XElement obj, string name, string defaultValue)
  {
      if (obj.Attribute(name) == null)
          return new XAttribute(name, defaultValue);
      return obj.Attribute(name);
  }
  
  var v = root.Attribute("testAttribute", "").Value;
  </code></pre>
  
  <p>Will this have any side-effects like a massive negative speed impact ?
  Is there any better way to do that?</p>