Add check to only search the alias map if it's an array.

This will stop the router from generating warnings if the alias map is not an array.