Using vanilla js, I\'ve put together a one liner that takes a long function, first checks to see if it has a valid value (not null), and if it has a valid value to use that long