from isinstance to type