How can I properly reset variables in this function?

Hi Community,

Trying to work on a solution to a problem. I have 3 input fields, min:sec:frame (mval,sval,fval)

when it is triggered, it works fine the first time. I clear out the variables in the script below but it doesnt work properly. It comes back as not a number (NaN)

here is my function:

gotoFrame.onRelease = function()
{
    if (mval == null)
    {
        mval = 0;
    }
    if (sval == null)
    {
        sval = 0;
    }
    if (fval == null)
    {
        fval = 0;
    }

    var numberOfFrames:Number = Math.round(24 * sval) + Math.round(1440 * mval) + Math.round(fval);
    trace("numberOfFrames is: " + numberOfFrames); // <<<NaN second time around

    mc.gotoAndPlay(numberOfFrames);
    var mval = null;
    var sval = null;
    var fval = null;
    var numberOfFrames:Number = null;
    inputMinute.text = "";
    inputSecond.text = "";
    inputFrame.text = "";
    resetTime();
};

Any suggestions to point me in the right direction? Thanks for looking!

A