Properly handle the case when a non-string is being validated.

Previously this would trigger 500 error when the parent request structure was
correct, but one of the leafs was a dict instead of a str.
It's generally better practice to not use reserved python names