Handle null when converting Strings to primitive wrapper types