Variable for timer duration

What do I need to do to make this variable be accepted?

val timerDuration = Item.state //item is a Number item

myTimer = createTimer(now.plusMinutes(timerDuration), [ |
    //do something
])

Make it into an integer, .intValue is useful here as shown in many forum examples.