Added sql string checking