core: check sorts of type parameters