Restore support for badges being null

I'm not sure what changed but this seems to be the easiest way to fix an actual bug in the current Wikibase master. Adding a SiteLink sometimes fails because $badges is null. It's null because of the way the Diff operations work. I think it's perfectly valid to allow null. That's why I'm proposing this patch.