A solution to avoid the ugly casting to JS::HandleValue.