You mean `if (typeof data.replacement === 'undefined')`?