Error when using compact function on a list

Whats your terraform version?
I saw on the compact function page that the null value started being handled from version 1.5.x.

If your version is higher, could you share your local.policies_for_this_account?

I’m assuming it’s:

policies_for_this_account = [
  "DeveloperAccess",
  null
]