You forgot the close curly bracket for this `if` statement.
You can check id instead of `id !== null && id !== ''`. It is shorter.