Fix exception when creating application

If container assigned to the application being created does not have the
port exposed at all, `AttributeError` will be raised, since we try to do
`None.get`.