Add isDegenerate method.