handle instanceof