What is the value if status_code doesn't exist? In Ruby all statements are expressions, include if..else... It's usually clearer and safer to use:

```
status_code.nil? [some_value] : status_code.to_i
```

Just to make sure that for either case the result is clear.