Assert sizes of the input to the function