PHP GET函数为NULL

I want to use GET in PHP and I know how to. The only problem is when I start my page I dont have a ?var=... on it. For example my site is

http://localhost/q/question.php

and in my code is

$num = $_GET['num'];

And I want to assume that if $num == NULL or has not been defined as in the link above.

I will generate a different page. because as example below just determines I am starting the questions in what ever page.

No num variable = Start Generating questions in array.

http://localhost/q/question.php?num=1
if(isset($_GET['num')){
header('Location: someotherpage.php');  //redirects user to someotherpage.php
//do something
}
else{
//do something else

}
<?php
   if(isset($_GET['num'))
   {
     echo "is not null";
   }
  else
  {
    echo "is null";
   }

?>