[utils] handle int values passed to str_to_int