faster and shorter way to check required columns