minor fix, accidental changes of sql is/is not None

accidentally search/replaced some sql syntax instead of python syntax