Refactored implementation of getBaseType method for yang built-in types.