You could move this outside the `elif` then let it fall through to the same code of converting to an int below and not have duplicated code here?