def METHOD_NAME(self):
    """
    Validates the state of this entity locally.
    Raises:
        ValueError: The entity does not have a name or does not have a type.
    """
    if not self.name:
        raise ValueError("The entity does not have a name.")
    if not self.value_type:
        raise ValueError(f"The entity {self.name} does not have a type.")