mher: Exported the checking to a new function