Replace if (ga->ga_len) with if (!GA_EMPTY(ga))

Used Coccinelle to perform the changes

```diff
@@
expression E;
statement S;
@@

(
- if (E.ga_len) S
+ if (!GA_EMPTY(&E)) S
|
- if (E->ga_len) S
+ if (!GA_EMPTY(E)) S
)
```