Find what type of input is

Find what type of input is

I got this piece of code

jQuery("#testInputAndOption").click(function() {       
        var inputOption = jQuery("#firstInput, #secondInput, #firstOption");       
    });

where firstInput, #secondInput are input type text and firstOption is an option type.
They are exclusive each other: is it possbile to call on the resultant inputOption the val() function if it is a input type or the text() function if it is an option type?

Kind regards
Massimo