New isDead function with increased performance by using the prototype.(Martin Genev's suggestion)