How to check if string is null or empty in JavaScript