sorry, I didn't look at this earlier, but could you just change this to ```else``` It won't change anything for books and chapters and even if this may not be entirely correct and the citation style may not have clear guidelines for other item types, it's still much better to have something than to have an empty entry (which at least with citeproc-js produces a big error message)