Fixing NRE with logging

This fixes #1292

`DefaultActionSelectorSelectAsyncValues.SelectedAction` could be null when no action is selected. This can happen when no action is matched, or there's an ambiguity.

Adding a null check to `Formatter` to handle this case.

Also added a couple checks to related tests.