Check if optional parameter is passed before actually accessing it.
Fixes for: EUCA-9391, EUCA-9387
Merge branch 'testing' of ssh://git.eucalyptus-systems.com/eucalyptus into testing