To check whether a value is a valid number, use isNaN( ).
package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ trace(isNaN(2)); } } }