Replace if/else chain with dict lookup [MJ-448]