Addition to check if result is object. Resolves issue #87