ABG
9
This is a special case covered generally at
Let's look at your basketballs count, on your first run.
You assign it a blank text if it is not found in TinyDB.
Later you try to add or subtract from it, using math blocks.
They don't like blank text. They only work with numbers.
After you fix all this, run your code.