Here's a fun JavaScriptCore quirk. When JavaScriptCore calls into your Swift functions with optional params, they will always receive a value, even if the caller didn't actually pass the argument, or if called with a different type.
For example, with a string param you'd get a value like "undefined" instead of nil.
Under the hood it seems to just cast whatever is passed into the expected Swift type. Safer to just use JSValue for all your parameters.
