function findBinaryExpressionConstantOperand(scope, a, b, operator) {
	if (operator === "==" || operator === "!=") {
		if (
			(isNullOrUndefined(scope, a) &&
				hasConstantNullishness(scope, b, false)) ||
			(isStaticBoolean(scope, a) &&
				hasConstantLooseBooleanComparison(scope, b))
		) {
			return b;
		}
	} else if (operator === "===" || operator === "!==") {
		if (
			(isNullOrUndefined(scope, a) &&
				hasConstantNullishness(scope, b, false)) ||
			(isStaticBoolean(scope, a) &&
				hasConstantStrictBooleanComparison(scope, b))
		) {
			return b;
		}
	}
	return null;
}
Checks if one operand will cause the result to be constant.
@param {Scope} scope Scope in which the expression was found.
@param {ASTNode} a One side of the expression
@param {ASTNode} b The other side of the expression
@param {string} operator The binary expression operator
@returns {ASTNode | null} The node which will cause the expression to have a constant result.