The if/else here seems unnecessary since we're returning null if the item doesn't exist and ehCacheInstance.get(key) returns a null if the object doesn't exist.