Improved entity property type checking: now instanceof is used (when working with object)