Need 404 behaviour for blank parent page

In functions.php

function productsPageRedirect_404() {
    global $post;
    if( is_page('products') ) {
       global $wp_query;
       $wp_query->set_404();
       status_header(404);
    }
}

add_action( 'wp', 'productsPageRedirect_404' );