Added test for extract_type