Type firstType = expressionTypes.get(node.getFirst());
Type secondType = expressionTypes.get(node.getSecond());
if (hasUnresolvedValue(first, second)) {
return new NullIfExpression(toExpression(first, firstType), toExpression(second, secondType));
}
Type commonType = FunctionRegistry.getCommonSuperType(firstType, secondType).get();
FunctionInfo firstCast = metadata.getExactOperator(OperatorType.CAST, commonType, ImmutableList.of(firstType));