I cleaned my MAF a while back, and although there was no visible contamination on it before, cleaning it solved a persistent P0171 problem I was having. I cleaned the MAF according to a simple procedure I'd read somewhere in this forum.
All you have to do, once you've removed the MAF, is to first spray it real good inside with ordinary carburetor cleaner. You can see the two wires when you look in the front end of the MAF; that's where you spray.
Afterward, you spray it again, this time with non-residue brake cleaner. This is to get rid of the residue left by the carburetor cleaner.
That done, you simply reinstall your MAF, and see if it helped. It might solve your problem, or it might not. In any event, it's a simple and cheap enough procedure that it's well worth trying, before you try anything more difficult or more expen$ive.