improve the checking for currying in batteries