Handle types better