Adding argument type checking to gcd function.