(re)fix valueAsResult
add tests for valueAsResult
Merge pull request #33 from lipp/fix-valueasresult

Fix valueasresult