struct buyer{ uint amount; Status status; } mapping(address=>buyer) public buyers; mapping(uint=>address) buyerIndex; uint publi
In solidity every variable is set to 0 by default.
0
You should think of mappings as all possible combinations are set to 0 by default.
mappings
In your specific case I would use the following:
if (buyers[msg.sender].amount == 0)