Null check didn't work - changed to isNaN(percentage)