Fix issue when testing with Lambda only or with the Alexa JSON test utterances, req.applicationId can be null and the applicationId is nested under reg.data.session.application.applicationId instead. Therfore, check to see if req.data.session is defined first and if so get the applicationId there first, if not defined, then get it from req.applicationId. This should fix issue #5 .
Fix issue when testing with Lambda only or with the Alexa JSON test utterances, req.applicationId can be null and the applicationId is nested under reg.data.session.application.applicationId instead. Therfore, check to see if req.data.session is defined first and if so get the applicationId there first, if not defined, then get it from req.applicationId. This should fix issue #5 .