Add annotations to asValueType function