There's this code in scriptdictionary: (there's one for int and int64 too)
else
{
// The stored type is an object
// TODO: Check if the object has a conversion operator to a primitive value
*(double*)value = 0;
}
return true;
However, as it's not implemented and doesn't work, why doesn't it return false here? I changed the code to return false here so that we can detect wrong types added to this in our own code.