Utilities for handling closure types during vectorisation