You could use the `extract_type_from` method here if you chose to do that refactor.