Preventing null-pointer derefs

CacheKey.keyArgs can be null (lines 89-99). 
Added an additional check.