Added validation check for the entity