TJ/HM: utils method to determine type of field based on name.