The effect of geographic range on extinction risk during background and mass extinction