Makes tree:has_value/2 a bit more compact