Sql Check Empty String Javascript Functions