Should there be an `undefined` check like below?