Added new getType() method by jdalton, ljharb and andrea gimmarchi. Thanks. Fixed Indenting.
Improved code and stability
Improved type check + cache + generic createDict() for building namespaces.