Fix NPE when bucketname is null (i.e. no bucketname passed on URL)