Added a null pointer check for event details cache