Meaningful error if registry value is wrong type.