Chagned isEntityDefined to be faster and not cause entity location reload when entity does not exist