Check If Empty String Javascript Substring