You could add a simple check inside the loop like this:
if (checkBook != null)
Your best option is to make sure that there are no null pointers. Just from the code I'm looking at here I can only assume that your Book constructor must return null somewhere. Never do this, or you'll have to put null checks everywhere. If you have to, just return a dummy instance. Your mostPagesBook() method should not have to concern itself with whether or not the Book is null.