Here, I want the function to trigger only if i have typed something in the input field. If it\'s empty I want to alert that it can\'t be empty. I tried if else condition but