Replace one more `elif` chain with dict