Added check if application exists in stack json

Make sure instance provisioning does not fail because an app has been forgotten in stack json - especially since the resulting error message was kind of unusuable.