The value passed to the element selector function (usually $w), must be of type string

Check the property ID of the boxes. It should be case-sensitive. Make sure it’s spelled correctly.