check if the element in the loop is a string

`for ( var i in c )` loops on all attributes of the array. Attributes could be `functions` or other types of things. Check if the element is a string before going on in the loop to prevent `TypeError: c[i].indexOf is not a function` errors.