I use the following to avoid notices, this checks if the var it's declarated on GET or POST and with the @ prefix you can safely check if is not empty and avoid the notice if the var is not set:
if( isset($_GET['var']) && @$_GET['var']!='' ){
//Is not empty, do something
}