title: Validating a non-empty String in Lo-Dash
body: <p>[Use-case: portable Lo-Dash code] 
  I've been looking for an elegant Lo-Dash empty-string validator in our nodeJS projects for some time now, because <a href="https://lodash.com/docs/4.17.5#isEmpty" rel="noreferrer">_.isEmpty()</a> only handles Arrays and Objects. So I always ended up doing it with the ugly old-fashioned likes of: </p>
  
  <pre><code>if (typeof(myString) !== "undefined" &amp;&amp; myString.trim() !== "") {
    // handle the string
  }
  </code></pre>
  
  <p>... Until I stumbled upon <a href="https://lodash.com/docs/4.17.5#toString" rel="noreferrer">_.toString()</a>, which returns <code>''</code> for <code>null</code> and <code>undefined</code>. So I created a mixin in our extendedLodash.js helper that uses only Lo-Dash methods. However I'm uncertain of caveats; <strong>any comment on what I might be overseeing is welcome</strong>: </p>
  
  <pre><code>'use strict';
  
  const _ = require('lodash');
  
  /**
   * Extension of _.isEmpty(), which will return `true` for 
   *   "", 0, [], {}, false, undefined and null
   * @param stringOrObjectOrNull
   * @returns {boolean}
   */
  function empty(stringOrObjectOrNull) {
    return _(stringOrObjectOrNull).toString().trim() === ""
        || _.isEmpty(stringOrObjectOrNull);
  }
  
  _.mixin({
    empty
  });
  
  module.exports = _;
  </code></pre>
  
  <p>Now we can use this: </p>
  
  <pre><code>const _ = require('../lib/helpers/extendedLodash'); 
  if (!_.empty(myStringOrObject)) {
    // handle the string ( ...or object ;-| )
  }
  </code></pre>
  
  <p>And test: </p>
  
  <pre><code>  console.log('is empty `[]`: ' + _.empty([]) + " -&gt; " + "`" + _.toString([]) + "`");
    console.log('is empty `{}`: ' + _.empty({}) + " -&gt; " + "`" + _.toString({}) + "`");
    console.log('is empty `""`: ' + _.empty("") + " -&gt; " + "`" + _.toString("") + "`");
    console.log('is empty `"    "`: ' + _.empty("    ") + " -&gt; " + "`" + _.toString("    ") + "`");
    console.log('is empty `0`: ' + _.empty(0) + " -&gt; " + "`" + _.toString(0) + "`");
    console.log('is empty `false`: ' + _.empty(false) + " -&gt; " + "`" + _.toString(false) + "`");
    console.log('is empty `null`: ' + _.empty(null) + " -&gt; " + "`" + _.toString(null) + "`");
    console.log('is empty `undefined`: ' + _.empty(undefined) + " -&gt; " + "`" + _.toString(undefined) + "`");
  </code></pre>
  
  <p>Note: Going over this code again, I realize this behaves just as fuzzy as PHP's <a href="http://php.net/manual/en/function.empty.php" rel="noreferrer">empty()</a> method ... I'm not sure that is appropriate; I just want to avoid necessity of catching <code>undefined</code> where variables might not be declared (...)</p>