code: function isEmpty(x) {
      if (!x) {
        // if '', 0, `null`, `undefined`, `NaN`, or `false` then is empty
        return true;
      }
  
      if (isNumber(x) || isFunction(x)) {
        return false;
      }
  
      if (isArray(x)) {
        // takes care of 'instances of Array'
        return !x.length;
      }
  
      if (x.size !== undefined && !(0, _object.instanceOf)(Function, x.size)) {
        return !x.size;
      }
  
      if (isObject(x)) {
        return !(0, _object.keys)(x).length;
      }
  
      return false;
    }
docs: Resolves/normalizes a type name from either a string or a constructor.
  @function module:object.toTypeRef
  @param type {Function|String} - String or function representing a type.
  @returns {String}
  @todo write tests for this function.