Cannot read property 'name' of undefined TypeError: Cannot read property 'name' of undefine

Ts file
import { Component } from ‘@angular/core’;
import { IonicPage, NavController, NavParams } from ‘ionic-angular’;

/**

@IonicPage()
@Component({
selector: ‘page-profile’,
templateUrl: ‘profile.html’,
})
export class ProfilePage {
responseData:any;
name:any;
uid:any;
userPostData = {“name”:""};
constructor(public navCtrl: NavController, public navParams: NavParams) {
const data = JSON.parse(localStorage.getItem(‘responseData’));
this.responseData = data.userData;

//this.userPostData.uid = this.responseData.uid;
//console.log('uid);
this.userPostData.name = this.responseData.name;

console.log(‘name’);
//this.userPostData.name = this.userDetails.name
if(typeof(Storage) != “undefined”)
{

        alert(localStorage.getItem('uid') );
      }
       
        else 
        {
          alert("Sorry, your browser does not support Web Storage...");
      }

}

ionViewDidLoad() {
console.log(‘ionViewDidLoad ProfilePage’);

}

}
HTML file

FIRST NAME
    <ion-label>LAST NAME</ion-label>
    <ion-input type="text" id="lastname" required></ion-input>
    <img src="assets/imgs/username1.png" height="25" class="img3"/>

    <ion-label>PHONE NUMBER</ion-label>
    <ion-input type="text" id="phonenumber" required></ion-input>
    <img src="assets/imgs/phone-number-1.png" height="25" class="img3"/>

    <ion-label>ADDRESS</ion-label>
    <ion-input type="text" id="address" required></ion-input>
    <img src="assets/imgs/address-1.png" height="25" class="img3"/>

    <ion-label>CITY</ion-label>
    <ion-input type="text"  id="city" required></ion-input>
    <img src="assets/imgs/location1.png" height="25" class="img3"/>

    <ion-label>STATE</ion-label>
    <ion-input type="text" id="state" required></ion-input>
    <img src="assets/imgs/state1.png" height="25" class="img3"/>

    <ion-label>ZIP CODE</ion-label>
    <ion-input type="text" id="zipcode" required></ion-input>
    <img src="assets/imgs/zip-code-1.png" height="25" class="img3"/>

    <ion-label>COUNTRY</ion-label>
    <ion-input type="text" id="country" required></ion-input>
    <img src="assets/imgs/country-1.png" height="25" class="img3"/>

    <div padding>
      <!-- <button ion-button block (click)="Home()" color="lightorange"><ion-icon name="star"></ion-icon> &nbsp;&nbsp; SAVE CHANGES</button> -->
      <button ion-button block (click)="getEmail()"  color="lightorange">SAVE CHANGES</button>
    </div>                
</form>

where is localStorage defined?