Implementing the Entity::getType function