[+BUGFIX] Only serialize session if it has been initialized
[+BUGFIX] Only serialize session if it has been initialized

As the command line mode does not use sessions, no initialized session
is available when the Object Manager tries to serialize it on
shutdown. This fix adds a check to assure that a session actually exists
before it is used.

Change-Id: I30ffcef4e54bc42ee9872e29942d51ad2d11c751
Original-Commit-Hash: 70dc60b40e0a9a5a4ac3b1d7e3937ecc0e48cf6c

dfeyer/flow-development-collection,albe/flow-development-collection,fcool/flow-development-collection,daniellienert/flow-development-collection,chewbakartik/flow-development-collection,albe/flow-development-collection,gerhard-boden/flow-development-collection,kitsunet/flow-development-collection,robertlemke/flow-development-collection,dfeyer/flow-development-collection,aertmann/flow-development-collection,neos/flow-development-collection,robertlemke/flow-development-collection,dlubitz/flow-development-collection,neos/flow-development-collection,dlubitz/flow-development-collection,fcool/flow-development-collection,chewbakartik/flow-development-collection,chewbakartik/flow-development-collection,mkeitsch/flow-development-collection,mkeitsch/flow-development-collection,gerhard-boden/flow-development-collection,bwaidelich/flow-development-collection,aertmann/flow-development-collection,daniellienert/flow-development-collection,dfeyer/flow-development-collection,fcool/flow-development-collection,daniellienert/flow-development-collection,neos/flow-development-collection,robertlemke/flow-development-collection,fcool/flow-development-collection,kitsunet/flow-development-collection,kitsunet/flow-development-collection,kdambekalns/flow-development-collection,kdambekalns/flow-development-collection,kdambekalns/flow-development-collection,dlubitz/flow-development-collection,gerhard-boden/flow-development-collection,albe/flow-development-collection,mkeitsch/flow-development-collection,neos/flow-development-collection,aertmann/flow-development-collection,robertlemke/flow-development-collection,dfeyer/flow-development-collection,bwaidelich/flow-development-collection,bwaidelich/flow-development-collection,kdambekalns/flow-development-collection