How to check null or undefined values in local storage of ionic and redirect to login page?

https://stackoverflow.com/questions/46282195/how-to-check-null-or-undefined-values-in-local-storage-of-ionic-and-redirect-to