If you're using Moose, of course, then you use the "Int" or "Num" types of course, if you want to be more specific.
Just a thought, would this be acceptable, assuming it worked?
use Moose::Autobox;if ($object->isa("Num")) { ...}