Fix accessing null when resource does not exist