How to make calculations only when a number is added into a textbox?