Can we use `typeof this[name] == 'string'` here instead of another function call?