fixed instanceof operators

There was an error inside of the fix for destroy() issue causing grunt build to fail.