Added inheritance-aware type check in entities.js in reference to issue #300.
Merge branch 'master' of github.com:/structr/structr