Was there a reason for factoring out the string into a separate getType() function?