Javascript Check If A String Is Empty In Java