use getType instead of type if available
0.2.1