Added `isTh` test to check whether a function is a thunk