title: Catching the NumberFormatException
body: <p>Below is the class somebody else wrote. </p>
  
  <p>The problem that I am facing is that when it get's into the <code>parse method</code> with <code>null as the rawString</code>, it is throwing <code>NumberFormatException</code>. </p>
  
  <p>So what I was thinking to do is, I should catch that NumberFormatException and <code>set the value itself as null</code>. So the way I did is right?</p>
  
  <pre><code>public class ByteAttr {
  
      @JExType(sequence = 1)
      private Byte value;
  
      public static ByteAttr parse(String rawString) {
          ByteAttr attr = new ByteAttr();
          try {
              attr.setValue(Byte.valueOf(rawString));
          } catch (NumberFormatException nfEx) {
              attr.setValue(null);
          }
          return attr;
      }
  
      public Byte getValue() {
          return this.value;
      }
  
      public void setValue(Byte value) {
          this.value = value;
      }
  }
  </code></pre>