title: How to resolve Java.lang.numberformatexception: empty string
body: <p>I have a utility function which convert <code>parseDouble</code> value to string.</p>
  <pre class="lang-java prettyprint-override"><code>public static BigDecimal setValue(Object o) {
    BigDecimal value = new BigDecimal(0);
    if(o!= Null){
      value=BigDecimal.valueOf(Double.parseDouble(o.toString()));
    }
    return value;
  }
  </code></pre>
  <p>I have tried with <code>(o!=null &amp;&amp; !isEmpty(o))</code> and <code>(o!=&quot;&quot; &amp;&amp; o!=null)</code> but it is still throwing same error.</p>
  <p>Transaction amount which is processing this utility function contains empty value.</p>