checks for valid divisor in division operation