fix npe when createStorage() returns null
Merge pull request #2451 from owncloud/fix_npe_master

fix npe when createStorage() returns null