It is to identify the `$type`. The 3 maps are constructed in a loop at the top of this function.