make sure the statement is type safe