Different method to check if input is empty.