don't generate casts if kettle is undefined