You do not even need the "? true : false" stuff - you should be able to directly return the result of the expression: 
return ((is_int($arg) && $arg >= 0) || (is_string($arg) && strlen($arg) > 0 && ctype_digit($arg)));
Might save another 10 CPUs cycles somewhere :)