title: if or condition doesn't work
body: <p>I'm new to javascript and I want to run some code depending if the state.value != null or "".it doesn't throw an error but freezes there. please see my code down below.any help would be really appreciated.</p>
  
  <pre><code>constructor(){
      super();
      this.state = {
          value:null,
          list:[]
      }
  }
  
  handleList = () =&gt; {
      //let list = this.state.list.slice();
      if (this.state.value != null || this.state.value.length() &gt; 0 ) {
          let list = [...this.state.list];
          list.push(&lt;li&gt;{this.state.value}&lt;/li&gt;);
  
          this.setState({list});
          console.log(list.length,this.state.list.length);
      }else{
          console.log("Cant enter null");
      }
  }
  
  
  render() {
  
      return(
          &lt;div className = 'global'&gt;
  
             &lt;button onClick={() =&gt; {this.handleList()}
              }&gt;Add-New&lt;/button&gt;
              &lt;input 
                  onChange = {
                      (e)=&gt;{this.setState({value: e.target.value})}
                  }
                  type = 'text' 
                  placeholder = 'Enter New Todo!'/&gt;
              &lt;hr/&gt;
              &lt;ul&gt;
                  {
                      this.state.list.map((li) =&gt; {
                          return (li);
                      })
                  }
              &lt;/ul&gt;
  
          &lt;/div&gt;
      );
  }
  </code></pre>
  
  <p>}</p>