Returns fallback when the value is null, undefined, NaN, or non-numeric.
Strings parse leniently via Number.parseFloat: a leading numeric prefix
wins even when a unit trails it ('12px' coerces to 12, '1.5rem' to
1.5). A string with no leading number ('px12', 'true') returns
fallback. Booleans and objects are never numeric and return fallback.