Check For Empty String Javascript Substring