Adding a get_type method