Wash sweet potatoes. Cook unpeeled sweet potatoes, covered, in small amount of boiling salt water untill tender, about 20 to 30 minutes. Cool. Peel and slice 1/4 inch thick; set aside.
Melt butter in medium saucepan. Add onion, cook until tender. Remove from heat; stir in flour, salt, basil, mustard and pepper. Cook over low heat until bubbly, 2 to 3 minutes. Remove from heat; stir in milk all at once. Cook over medium heat, stirring constantly, until mixture comes to a boil. Boil and stir one minute. Remove from heat. Stir in 3/4 cup of cheese and the ham.
Pour half of mixture into greased 2 quart casserole. Arrange half of sweet potaotoes on top. Repeat layers. Bake at 350*F, 25 minutes. Sprinkle with remaining cheese and bake 3 to 4 minutes longer, or until cheese has melted.