Fix nil being passed to Regex.match? in Format validator