title: ASP.NET MVC - Telerik MVC TreeView binding to a model
body: <p>my application is an asp.net MVC; I am using Telerik MVC Tree view to display nodes from a model, it works well, except when a value of one node is null.</p>
  
  <p>here is my TreeView:</p>
  
  <pre><code>&lt;% IEnumerable&lt;MyTreeNode&gt; tree = ViewBag.TreeData.Nodes; %&gt;
  &lt;%= Html.Telerik().TreeView().Name("TreeView").BindTo(tree, mappings =&gt;
           {
      mappings.For&lt;MyTreeNode&gt;(binding =&gt; binding.ItemDataBound((item, myTreeNode) =&gt; {
                                      item.Text = myTreeNode.Text; })
                                      .Children(myTreeNode =&gt; myTreeNode.Nodes));
                                     })
    .ClientEvents(events =&gt; events.OnSelect("onSelect")) %&gt;
  </code></pre>
  
  <p>I get the following error (pointing to myTreeNode.Text) "value" cannot be null or empty.</p>
  
  <p>I tried:</p>
  
  <pre><code>  if (!IsNullOrEmpty(item.Text))
       {
        item.Text = myTreeNode.Text;
       }
  </code></pre>
  
  <p>I get this error: The name 'IsNullOrEmpty' does not exist in the current context.</p>
  
  <p>Any suggestions, thanks in advance.</p>