Fix empty entities lookup

When an entity is being looked up by uuid, the value of it is not True,
therefore the check in _action was returning None. Check if the entity 
is not None instead.