Cook chopped onions in butter until tender, but not brown. Blend flour, salt, and pepper. Add milk all at once. Heat and stir until boiling. Remove from heat. Add grated cheese, stirring to melt cheese.