Optized 'instanceof' operator