Since the expression `stringUtil.trim(inputFieldValue) === ""` is used 3 times in this function (and the opposite one `!==""` additional one time), maybe it's time to extract this into a local variable say `var inputFieldIsEmpty = stringUtil.trim(inputFieldValue) === " ` and then use `inputFieldIsEmpty` / `!inputFieldIsEmpty` ?