Corrected check for non-existing book