indeed.

Thus, ``$constraint`` may not be a string here, so you cannot simply cast it as string.