fix: stay calm when getting stats of non-existing resources

Introduced in 9cd8bfbe.