type checking by canonical way