let is_none (x : 'a option) =
  match x with
    None -> true
  | Some _ -> false