DRY for #89
improved check for the leveles of measurement