typeof to exists conversion