I have seen that many posts do recommend using default values to check whether a key in a mapping exists.
For example, if i have a mapping
struct Holder {
uint256 Value1,
uint256 Value2
}
mapping(uint256 => Holder) public HolderMapping;
Holder storage firstHolder;
firstHolder.Value1 = 1;
firstHolder.Value2 = 1;
HolderMapping[1] = firstHolder
Now if i want to test whether some key exists, is it a safe method to check whether Value1 and Value2 are default values inside the key? like checking if HolderMapping[2] has Value1 and Value2 == 0?
Or are there safer methods? I hope my questions clear, thanks!