Fix to add support for String arrays in factories

I got a `TypeError: Object.keys called on non-object` when trying to include a basic String array in a factory. This is a fix for that problem.

I'm not sure if this is the best way to solve it, so feel free to give feedback if you want this to be solved in a different way.