title: WPF String Length Converter
body: <p>I am using a converter to check if a String length is bigger then 0 or not.
  If it's bigger i return true else false.</p>
  
  <p>Everything is working fine. But i was wondering if this is the correct way of a converter?</p>
  
  <pre><code>    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
      {
          bool error = false;
          if (value != null)
          {
              if (value.ToString().Length &gt; 0)
              {
                  error = true;
              }
              else
              {
                  error = false;
              }
          }
          return error;
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
      {
          throw new InvalidOperationException("IsNullConverter can only be used OneWay.");
      }
  </code></pre>