Added a generic function to check if a DH group is an EC group