[core] add a friendly version of setValuesForKeysWithDictionary that doesn't throw when using BOOLs and such