Check for a specific taxonomy of a custom post type

Use is_tax():

if ( is_tax( 'book_categories' ) ) {

}

if ( is_tax( 'book_year' ) ) {

}

tech