Add type-checking for the two region functions