Better error message if wrong amount of types in the database
Implemented support for building sql scripts for check_type function
Fixed problem with UUID generation