Tidy up EC parameter check code: instead of accessing internal structures