Changes the type annotation to a more specific one if possible.