1. A computer-implemented method comprising: analyzing, by a computer system, a codebase comprising a first dynamically-typed variable or function; determining, by the computer system, a first set of characteristics relating to the codebase based on the analyzing the codebase, wherein the first set of characteristics comprises information regarding usage of the first dynamically-typed variable or function in the codebase; determining, by the computer system, a first set of potential data types for the first dynamically-typed variable or function based on the first set of characteristics; determining, by the computer system, a first candidate data type for the first dynamically-typed variable or function based on the first set of potential data types; converting, by the computer system, the first dynamically-typed variable or function in the codebase to a first statically-typed variable or function in the codebase based on the first candidate data type; and checking, by the computer system, the codebase for one or more errors in response to the converting the first dynamically-typed variable or function to the first statically-typed variable or function.