Add documentation and test for Val{T}