Added checks and use _.isArray

* changed the code to use _.isArray - not needed
* keys true/false etc. failed on the more sensitive Android 2.3.5
* Android 2.3.5 is sensitive around JSON so I added type casting to
String