Use instanceof self if possible
Merge pull request #171 from wmde/self

Use instanceof self if possible