Test for empty slot

Trying to make an execute if command that can detect if a specific slot of a specific container is empty

Here is what I tried:

/execute if items block ~ ~ ~ container.2 minecraft:air

But unfortunately that doesn't work

If anyone could share the correct way to do it, that would be much appreciated!

Thanks in advance

Continue to help post