Correct way to get/test the value of a selected radio button group?

Correct way to get/test the value of a selected radio button group?

In validating a form, I need to make a decision based on the result of a radio button group.

The radio button group is defined like this:

<input name="payment_method" value="visa" type="radio" class="radio payment_method">Visa
<input name="payment_method" value="mastercard" type="radio" class="radio payment_method">Mastercard
<input name="payment_method" value="cheque-moneyorder" type="radio" class="radio payment_method">Cheque/Money Order

I need to return 'True' from the following if the radio button group is either visa or mastercard, and false if it's unset or cheque-moneyorder.

Currently I'm testing like this:
return  $("input[#payment_method]:checked").val()=="visa" || $("input[#payment_method]:checked").val()=="mastercard";

Is this correct? Is there a better/different way to test this? Something about this syntax causes the validation to fail if any checkbox or radion button on the form is selected, so I'm wondering if something about the use or position of :checked might be throwing things off.