check value instead of key presence to know if we must use optimisation or not