Make checking for missing values optional, based on bool input