check for value before applying