Adding getType method