Fixed "instanceof" with undefined classes