Retrieve proper type from input