Some functions didn't include the `nil` case in the return type annotation. This corrects those and also adds a Diagnostic class definition for the diagnostic.get return type
local vim = ...
vim.keymap.{set,del}
vim.deepcopy
vim.NIL