coerce strings when reading attributes.

Closes #10485.