Check for key undefined before checking length
Merge pull request #2364 from guardian/clickstream-type-error

Clickstream.js type error