// Another option is typeof which return a string
if (typeof(val) === 'number') {
// Guess what, it's a bloody number!
}
const checkInputIfNumber = isNaN(0924891242a)
console.log(checkInputIfNumber) //returns true
import sys
def checkNum(number):
try:
number = float(number)
except ValueError:
print("That is not a float.")
sys.exit()
return number