Condition Based on Single page for targeting specific post type

<?php 

// condition for targeting single by ID , Title
if (is_single('17')){
//target single page of id **17**
}

if (is_single('demo')){
//target single page title **demo**
}



//This Condition will execute on Single **Post** Page only
if ( is_single() && 'post' == get_post_type() ) {
   
}
 
//This Condition will execute on Single of custom post type **portfolio**
if ( is_single() && 'portfolio' = get_post_type() ) {
   
}

//execute on **all** single of except any specific post type for an example i used **portfolio**
if ( is_single() && 'portfolio' != get_post_type() ) {
   
}


?>