improve checktype() -> proto()