[eluser]CroNiX[/eluser]
You don't really need to do that in validation. You can cast it to an int.
Code:
$number = (int)$this->input->post('number_field');
If number_field doesn't exist in CI's post array, $number will be 0 because the value will be boolean FALSE which is int(0) and the same with an empty string.