Adding very basic type checking