Style nit: I prefer `.nil?` to `!` here.