Implemented validation in Types.
Created a validator.