Mass. AG investigates non-profits' help to communities