Updated grouped option types function