simplified divzero exception check