Duck-Typed Value Handling for JavaScript