Question: Using Properties, I figured one can easily get things mixed up. Like the code below, I'd love `id` to be of type `int` but don't know if Python can allow me do that without a try statement and catching ValueError

```
def getter(self):
    return id

def setter(self, id):
    self.id = id

```

If I input `'boy'` instead of `1` in there, the code still run. Is there a way to eliminate this?

Answer: 
you can just call int on id:

```
def setter(self, id):
  self.id = int(id)

```

now passing `1` or `"1"` will work, but passing `"boy"` will raise an exception
```
def setter(self, id):
    if not isinstance(id, int):
        raise TypeError("dude, id has to be int")
    self.id = id

```

Now if someone passes incorrect input you should wrap the assignment code with `try:except:` block and handle it as you wish.