Fixed a bug in ActionToInteger.

[Issue]
  NaN is displayed as a text.

[Cause]
  Text is passed to ActionToInteger (arguably due to the content's bug.)

[Fix]
  Fixed the ActionToInteger not to return NaN.