Guard against null objects
Sometimes "application" can be null. Add more checks for that.
examples of errors are:
qrc:/qml/InstallApplicationButton.qml:18: TypeError: Cannot read property 'state' of null
qrc:/qml/InstallApplicationButton.qml:24: TypeError: Cannot read property 'isInstalled' of null
qrc:/qml/InstallApplicationButton.qml:41: TypeError: Cannot read property 'isInstalled' of null
qrc:/qml/InstallApplicationButton.qml:42: TypeError: Cannot read property 'isInstalled' of null
qrc:/qml/InstallApplicationButton.qml:44: TypeError: Cannot read property 'isInstalled' of null
qrc:/qml/InstallApplicationButton.qml:85: TypeError: Cannot read property 'state' of null