Extract functions that make assertions easier.
Type already given by function signature.