[#BUG 7367] fixed instanceof check