There is a versa to the vice of this int only type check.
is_int( $integer_type) will only return true, if the TYPE is int, not the value
ctype_digit( $string_type) will only return true if the TYPE is string, and its value is INT
therefore:
return ( is_int($value) || ctype_digit($value) );