Improve checks of functions inside records