[Refactoring] Handled the case where the code action extension isn't
set.