Check if a value is a number

JavaScript version
const isNumber = (value: any): number => !isNaN(parseFloat(value)) && isFinite(value);