Why not call chapter.isValid() in this case as well (like you do when looping through multiple chapters)?