capture A's value if B's value is null or undefined, otherwise use B's value
6497
function resolveBindingValue(oldValue, value) {
    if (value === undefined && oldValue === null) {
      return value;
    }
    return (value === null || value === undefined) ? oldValue : value;
  }
377744
def null():
    """"""
    import ibis.expr.operations as ops

    global _NULL
    if _NULL is None:
        _NULL = ops.NullLiteral().to_expr()

    return _NULL
720160
function (arr, pred) {
    for (var i = 0; i < arr.length; i++) {
      var value = arr[i];
      if (pred(value, i, arr)) {
        return value;
      }
    }
    return null;
  }
756833
function(a, b) {
       if (typeof a != typeof b) return
       if (a === b) return true
       if (a instanceof RegExp)
         return a.toString() === b.toString()
       if (a instanceof Date)
         return Number(a) === Number(b)
       if (typeof a != 'object') return
       if (a.length !== undefined)
         if (a.length !== b.length) return
         else
           for (var i = 0, len = a.length; i < len; ++i)
             if (!equal(a[i], b[i]))
               return
       for (var key in a)
         if (!equal(a[key], b[key]))
           return
       return true
     }
1281317
function(a, b) {
            var c = this.instances[this.id];
            if (!c[a]) {
                if ( a.indexOf('>') > -1 ) {
                    var e = a.replace(/ /g, '').split('>');
                    for ( var i = 0; i < e.length; i++ ) {
                        if ( !c[e[i]] ) {
                            if (b) {
                                c[e[i]] = ( (i + 1) < e.length ) ? [] : b;
                            } else {
                                return null;
                            }
                        }
                        c = c[e[i]];
                    }
                    return c;
                } else if ( b && !c[a] ) {
                    this.set(a, b);
                }
            }
            return c[a];
        }
49879
function isValueEmpty(value) {
  if (_.isUndefined(value)) {
    return true;
  }
  var canUseIsEmpty = _.isString(value) || _.isArray(value) || (_.isObject(value) && !_.isDate(value)) || false;
  if (canUseIsEmpty) {
    return _.isEmpty(value);
  }
  return (_.isNumber(value) || _.isBoolean(value) || _.isDate(value)) ? false : true;
}
628917
function (key, value) {
    /* jshint eqnull:true */
    _str.push(_encode(key) + '=' + (value === null || value === undefined ? '' : _encode(value)));
    // _str.push(( key ) + "=" +  (value == null ? "" : ( value )));
  }
613037
public static Short checkNull(Short value, Short elseValue) {
        return isNull(value) ? elseValue : value;
    }
614493
function getValue(fromObject, fromKey) {
  var regDot = /\./g
    , regFinishArray = /.+(\[\])/g
    , keys
    , key
    , result
    , lastValue
    ;

  keys = fromKey.split(regDot);
  key = keys.splice(0, 1);

  result = _getValue(fromObject, key[0], keys);

  return handleArrayOfUndefined_(result);
}
419655
function parseCustomValue(value, parse) {
  try {
    let parsed = parse(value)
    if (parsed === undefined) {
      return { value: null }
    }
    return { value: parsed }
  } catch (error) {
    return { error: error.message }
  }
}
1061722
public static Float checkNull(Float value, Float elseValue) {
        return isNull(value) ? elseValue : value;
    }
1345755
public static void checkNull(Object o, Object value) {
        if (o != null)
            error(String.valueOf(value));
    }
796253
def _raise_if_null(self, other):
        
        if self.is_null():
            raise ValueError("Cannot compare null Intervals!")
        if hasattr(other, 'is_null') and other.is_null():
            raise ValueError("Cannot compare null Intervals!")
808465
function checkValue(value, test, topData) {
  return _.every(test, function (val, operator) {
    val = getRef(val, topData);
    if (operator === '$eq') {
      if (_.isArray(value) && !_.isArray(val)) {
        return value.indexOf(val) > -1;
      }
      return _.isEqual(value, val);
    }
    if (operator === '$ne') {
      return !_.isEqual(value, val);
    }
    if (operator === '$gt') {
      return value > val;
    }
    if (operator === '$gte') {
      return value >= val;
    }
    if (operator === '$lt') {
      return value < val;
    }
    if (operator === '$lte') {
      return value <= val;
    }
    if (operator === '$in') {
      if (!_.isArray(val)) {
        throw new Error('$in must be an array');
      }
      if (_.isArray(value)) {
        return _.find(value, function (v) {
          return inArray(v, val, topData);
        })
      }
      return inArray(value, val, topData);
    }
    if (operator === '$nin') {
      if (!_.isArray(val)) {
        throw new Error('$nin must be an array');
      }
      if (_.isArray(value)) {
        return _.every(value, function (v) {
          return !inArray(v, val, topData);
        })
      }
      return !inArray(value, val, topData);
    }
    if (operator === '$not') {
      if (val instanceof RegExp) {
        return !(typeof value === 'string' && val.test(value));
      } else if (isExpression(val)) {
        return !checkValue(value, val, topData);
      } else {
        throw new Error('$not needs a regex or a document');
      }
    }
    if (operator === '$regex') {
      if (test.$options !== undefined && typeof test.$options !== 'string') {
        throw new Error('$options has to be a string');
      }
      if (typeof val === 'string') {
        val = new RegExp(val, test.$options);
      } else if (val instanceof RegExp) {
        if (test.$options) {
          val.compile(val.source, test.$options);
        }
      } else {
        throw new Error('$regex has to be a string or RegExp');
      }
      if (typeof value === 'string') {
        return val.test(value);
      }
      return false;
    }
    if (operator === '$options') {
      if (!test.$regex) {
        throw new Error('$options needs a $regex');
      }
      return true;
    }

    if (operator === '$all') {
      if (!_.isArray(val)) {
        throw new Error('$all has to be an array');
      }
      if (!val.length) return false;
      for (var i in val) {
        var el = val[i];
        if (_.isArray(el)) {
          return _.isEqual(el, value);
        }
        if (isExpression(el)) {
          if (!el.$elemMatch) {
            throw new Error('no $ expressions in $all');
          }
          // $all with $elemMatch
          return _.find(value, function (v) {
            return checkDepends(el.$elemMatch, v, topData);
          });
        }
        if (!findArrayElement(value, el, topData)) {
          return false;
        }
      }
      return true;
    }

    if (operator === '$elemMatch') {
      if (!operator || typeof val !== 'object') {
        throw new Error('$elemMatch needs an Object');
      }
      if (!_.isArray(value)) return false;
      if (isExpression(val)) {
        return _.find(value, function (v) {
          return checkValue(v, val, topData);
        });
      }
      // Object
      return _.find(value, function (v) {
        return checkDepends(val, v, topData);
      });
    }

    if (operator === '$size') {
      if (typeof val !== 'number') {
        throw new Error('$size needs an number');
      }
      return _.isArray(value) && value.length === val;
    }

    if (operator === '$exists') {
      if (typeof val !== 'boolean') {
        throw new Error('$exists needs a boolean');
      }
      var res = value === undefined;
      return val ? !res : res;
    }
    throw new Error('unsupported comparison operator: ' + operator);
  })
}
585319
def _is_null(self, value):
        """"""
        if isinstance(value, six.string_types):
            if not len(value.strip()):
                return True
        return value is None
644142
private Object getRawValueOrNullIfAbsent(String columnName, Map<String, Object> content)
            throws SerDeException {
        try {
            return getRawValue(columnName, content);
        } catch (ColumnNotFoundException e) {
            return null;
        }
    }
1234276
function processString(state, value, data) {
  return value.replace(TEMPLATE_REGION, function(path) {
    var insert = envEval(state, path.slice(2, -1), data, value);
    return state.options.blankNullUndefined && insert == null ? '' : insert;
  });
}