title: Checking if String is empty or only white spaces
body: <p>I have simple function handling a DOM event (input field from HTML document) that should proceed only if the value is not empty (nothing typed in the field) or only white space (user spamming space bar). How do I check both these with if-block of code? </p>