Check whether unsafe casts of terms failed