As the code you reported is looking for the form ID of the node form, there are two cases.
Drupal 6
If the code is trying to alter the form used to set the settings for a content type, then it should use the following IF-statement.
if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { }
If the code is trying to alter the node edit form, then the code should use the following IF-statement.
if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] . '_node_form' == $form_id) { }
Drupal 7 and higher
In the first case, the IF-statement should be the following one:
if ($form_id == 'node_type_form') { }
Using a different approach, supposing that mymodule is the short name of your module, you could use mymodule_form_node_type_form_alter(&$form, &$form_state, $form_id)
. Since Drupal 7, all the hooks used to alter the form implemented by another module gets $form_id
as last parameter. See hook_form_alter(), hook_form_FORM_ID_alter(), hook_form_BASE_FORM_ID_alter().
In the second case, the IF-statement is the same used for Drupal 6.
if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] . '_node_form' == $form_id) { }
hook_form_alter()
. Given also the reported code, I would say this question is different.