What is the best way to detect if a variable (global or local) has been created?

In the following code, if you run it with the variable 'casefile' defined, the alert works as expected.
When you run it with no casefile = assignment, neither alert is displayed.

Why do I get no alert notification when 'casefile' is not assigned or defined?
When a global or local varialbe has been accidently left unassigned or undefined,
how should it be checked if maked a default assignment?

Hope I'm making myself clear. When is a variable undefined or null and how is that condition checked so a default value could be created?

<title> Untitled </title>
<meta charset="utf-8">

<script type="text/javascript">

var str = '';

// var casefile;                            // works fine if this variable is created
// var casefile = 'The variable casefile';  // run script with this line IN and then commented OUT
// NOTHING displays if both lines above are commented OUT

if (casefile) { str += casefile+' is available\n\n'; }
         else { str += casefile+' is not available\n\n'; }

if (casefile == undefined) { str += casefile+' is undefined\n\n'; }
                      else { str += casefile+' is not undefined\n\n'; }

if (casefile == null) { str += casefile+' is null\n\n'; }
                 else { str += casefile+' is not null\n\n'; }