Check for isInfinite in addition to isNaN fixed shadow example