It all depends on the contact cleaner.
If it is the proper stuff that actually works on tarnished contacts ( Servisol Super 10) then it leaves a protective lubricating film behind. The MAF will be unhappy.
If it is the carp “dry-clean” stuff (I was given three different ‘brands’ to try, possibly all off the same far east production line) then it is useless at cleaning contacts and has neither lubricant nor de-oxidant, but might be OK on the MAF.
Pure Isopropyl alcohol spray will be fine at removing oil (eg from a non-standard air filter) and general diesel dust (passing through an inadequate air filter).