code: public SemanticType extractFieldType(SemanticType.Record type, Identifier field) {
  		if (type == null) {
  			return null;
  		} else {
  			SemanticType fieldType = type.getField(field);
  			if (fieldType == null) {
  				// Indicates an invalid field selection
  				syntaxError(field, INVALID_FIELD);
  			}
  			return fieldType;
  		}
  	}
docs: From a given record type, extract type for a given field.