How to check if eval() doesen't return anything?

Need help with the Javascript
I don’t know how to check if eval(num) doesen’t return anything and if that is a number.
Please help here is my code:

    num = output.value;
    var a = eval(num);
    if(typeof(a) !== 'undefined') && (a !== null)){
      console.log('Please be specific');
    } else {
      output.value = a;
    }

Thanks :slight_smile: , but how to console.log() if the eval() doesen’t return anything?

I want to concole.log() when a is a wrong condition like 7++ 7 or 20 // 5 or 20 - 5 - .

Thanks a lot for the help! :slight_smile: