Simplify hasValue