Assume we have a Views page which does not have a contextual filter setting and the view path is /eureka. If you provide an argument in the url such as /eureka/abc, the argument is ignored and the Views page will return all view rows. But sometimes we may want to show the user a page not found instead of return all rows. This can be done by adding a Global: Null argument in the contextual filter.
1. Add a Global: Null input in the View Contextual Filters settings.

2. Check the Specify validation criteria option and select PHP Code as validator.

if (empty($argument)) {
return TRUE;
} else {
return FALSE;
}
Done =)