Additional guard clauses to handle null in _createResource()