Cursed Wonderglade Help [Solved]

Please help me with the Cursed Wonderglade level
here is my level code:

It says

#colloct it only if its type isn't gem not is gem.

I will try that thanks!

Yes thank you it worked!

try putting pass underneath

If item and item.type == "gem"

Hi sorry but I already got the solution which is switch the code to:
If item and item.type != “gem”

Yeah I know but also if you want the code to run fully you might wan to add that pass