better error msg on inferext and checkstm