Protect against null
Do not crash when a resource is missing.