Replace assert with PRECONDITION