CLOUDIFY-2120 - throwing illegal state exception instead of NPE when the cloud object is null.