null pointer check added to entry manager. And improved the comparison method