Remove pretty photo style and script if not exist!

I got it to working finally .. The code is:

add_action( 'wp_enqueue_scripts', 'pretty_photo_styles', 100 );
function pretty_photo_styles() {
   if ( ! is_single() ) {
    wp_dequeue_script( 'pretty_photo' );
    wp_dequeue_style( 'pretty_photo' );
    }
}

Please someone correct it if I missed anything!
I tried it and it worked for me.