Remove uneccessary isset check

- added intval since it clarifies that an int is expected
- added curly braces since it's a good practice :)