Type checker checks expressions inside print statements

Print statements are always TUndefined, unless they contain an
expression that can't pass type checking, in which case the error
needs to be thrown.