code: public static Expression firstNonNull(final Expression left, final Expression right) {
      checkArgument(left.resultType().getSort() == Type.OBJECT);
      checkArgument(right.resultType().getSort() == Type.OBJECT);
      Features features = Features.of();
      if (Expression.areAllCheap(left, right)) {
        features = features.plus(Feature.CHEAP);
      }
      if (right.isNonNullable()) {
        features = features.plus(Feature.NON_NULLABLE);
      }
      return new Expression(left.resultType(), features) {
        @Override
        protected void doGen(CodeBuilder cb) {
          Label leftIsNonNull = new Label();
          left.gen(cb); // Stack: L
          cb.dup(); // Stack: L, L
          cb.ifNonNull(leftIsNonNull); // Stack: L
          // pop the extra copy of left
          cb.pop(); // Stack:
          right.gen(cb); // Stack: R
          cb.mark(leftIsNonNull); // At this point the stack has an instance of L or R
        }
      };
    }
docs: Returns an expression that evaluates to {@code left} if left is non null, and evaluates to
  {@code right} otherwise.