get_valid function

Get one valid value from vector.