Moved validation into datatypes