I have a cage with a perch on the cage door, so when i put him away he is usually on that perch. So are you saying that i should get him to move to another perch before i close the door. Isnt that like avoiding the issue? or is that what is needed in this situation?
I wouldn't call it avoiding the issue, but I suppose it is a fair description. I could try to train an alligator to hold its mouth open while I put my head inside... but I think it'd be better just to avoid that issue as well.
Yes, I am being a bit facetious (just a bit). People like to think they should be able to do anything to their pets and their pets should be willing to take it. Within reason I'd agree. If your bird bites you for no (good) reason then perhaps they need some training, but they are their own individuals - if they bite for good reason we should learn to respect some boundaries.
I don't think it is unreasonable for a bird to be protective of their cage. We should respect their space. We should also insist on having means to put them in, take them out, and clean as needed, but they are allowed to have input in the negotiations on how this will go.
Okay ... on a less philosophical level: I would not really call it avoiding, I would call it differential reinforcement of another behavior. Currently he tries to bite you when you close the cage door. There are really only two contingencies you can place on this behavior: punish the behavior, or reward him for NOT biting. It is very hard to punish a parrot (in fact most forms of punishment cause more problems than they solve with all pets). It is also technically impossible to reward him for "not biting." You can't reward a non-behavior. You can however reward a behavior that is incompatible with biting, such as going somewhere else in the cage.
So, you can either try to beat him into submission so that he never bites ... which would lead undoubtedly to many more bites and a dead parrot; or you can teach him not to bite.
A man sees a therapist and asks why his wife slaps him. The therapist asks for more information and learns that the wife slaps him every time he flirts with another woman. The therapist tells him to stop flirting with other women. The man asks in response - but isn't that just avoiding the issue?
Sometimes we have very odd expectations of our pets. The first step in training is understanding.