Added _getResources() and null checking guard clauses.