code: protected function typecastValue(ArrayExpression $expression, $value)
      {
          if ($value instanceof ExpressionInterface) {
              return $value;
          }
  
          if (in_array($expression->getType(), [Schema::TYPE_JSON, Schema::TYPE_JSONB], true)) {
              return new JsonExpression($value);
          }
  
          return $value;
      }
docs: Casts $value to use in $expression
  
  @param ArrayExpression $expression
  @param mixed $value
  @return JsonExpression