function for numeric checks and returns false when dividing by zero