Update app.js for using typeof