Merging fix done for IDENTITY-2722

Fixing NPE when running cache cleanup task. Related JIRA: https://wso2.org/jira/browse/IDENTITY-2722
Merge pull request #100 from darshanasbg/master

Merging fix done for IDENTITY-2722