Modify thunk function to check for formula function result length.