Centralised the possible types in a method, instead of duplicating the code
Extra validation in setType so we are sure it is a valid type
Use the method with our types as saving would fail if we add custom types
Better Exception
Simplified code.
Merge pull request #41 from sumocoders/centralised-types

Centralised types