Added conditional check before advancing the token cursor in compileParam.