Checking result type in emit handler. Socket emit handler crashes when it tries to parse result which is already an Object.
Merge pull request #633 from elnights/development

Checking result type in emit handler.