Sanity checks at ann.optimizer