Node form alter query
Typically you would use a check on $form_id to make sure your hook_form_alter would only apply the specific form. A node editing form is normally only present on edit pages, so it would only apply to edit pages as the form is not displayed anywhere else.

Don't forget that hook_form_alter is called on all forms, so you need to check for the some values to not apply it to all forms. Usually this is the form_id.

To check for a specific form you would use:

/**
* Implementation of HOOK_form_alter()
*/
function MYMODULE_form_alter(&amp;$form, $form_state, $form_id) {

  // 1.UNIT CONTENT TYPE FORM
  if ($form_id == 'unit_node_form') {

  }

}


This can be helpful if you modify multiple forms in one module.
If you prefer not to do that you should maybe use hook_form_FORM_ID_alter() to modify only a specific form.

Checking the form api $form_id is defined as:


  String representing the name of the form itself. Typically this is the name of the function that generated the form.


The question this throws up now is:

Is $form_id defined from 

$form['form_id']['#value'] 


or from 

$form['#form_id']


Both of which give the same results. 
So unfortunately I can not directly give you an answer, other than that the form will only display on edit pages, so using $form_id seems to be standard proceedure.