check for divide by zero