Add check value function.