Error when trying to convert a string to a nullable int. Updated method to get underlying type of nullable type, if applicable.