implemented object check for JSON.parse