if (! $('input[name="inputName"]').length) {
//Your code when inputName does not exist!
}
if( $('#selector').length ) // use this if you are using id to check
{
// it exists
}
if( $('.selector').length ) // use this if you are using class to check
{
// it exists
}