You are using the following for checking permissions whether user has access to the content type:

  if (!user_access("create $type_name content") ) {
    return drupal_access_denied();
  }

But this doesn't work for blog as it uses 'create blog entries' permission. The cleaner way of checking that would be a solution from 'node/add' menu item in node.module:

  if (!user_access('create', $type_name) ) {
    return drupal_access_denied();
  }