RT-1184524: Check variable is array before running count()
This prevents the warning: Parameter must be an array or an object that implements Countable.
Automation access tokens are expiring. If you do not use automation that relies on a personal, group or project access token, this message can be safely ignored.
For more information, see https://about.gitlab.com/blog/2023/10/25/access-token-lifetime-limits/
This prevents the warning: Parameter must be an array or an object that implements Countable.