The ajax call not made if the input field is empty