is the `$name !== null` check required?