code: def is_valid_interval(interval):
      
      if not isinstance(interval, (int, long)):
          return False
  
      if interval <= 0:
          return False
  
      return True
docs: Checks if the given interval is valid. A valid interval
      is always a positive, non-zero integer value.