Can the database return nil if the connection failed and maybe throw a warning because actually it just throws an error and stops the code execution