Return null if the string can't be parsed.