fix(*): don't use instanceof to detect arrays

this breaks when multiple javascript contexts are involved - like in node-webkit

see original PR: #1966

Closes #1966
style(filter): remove ws