Use match for type