Refactored getType calls to be consistent