title: undefined get set for null value even not returning in ractjs
body: <p>I'm getting undefined in updatelist for in case of emp_id is null.
  Even I'm not returning anything if emp_id is null.</p>
  <p>Please help me to fix this.</p>
  <pre><code>    const update1 = res.data.map((updatecol) =&gt; {
          if (updatecol.emp_id === null) {
          } else {
              return {
                  label: updatecol.emp_name,
                  value: updatecol.emp_name
              };
          }
      });
  
      this.setState({
          updatelist: update1
      });
  </code></pre>